This error message indicates that there are two issues with the 'demoTest' class:

  1. The method named 'getIpAddr()' is expected to have a return type of 'void', but it does not.
  2. The method named 'getIpAddr' is expected to have no parameters, but it has one or more parameters.

To fix these issues, modify the 'demoTest' class to ensure that the 'getIpAddr()' method has a return type of 'void' and has no parameters.

For example:

public class demoTest {
  @Test
  public void getIpAddr() {
    // test code here
  }
}

In this modified version of the class, the 'getIpAddr()' method has been updated to have a return type of 'void' and no parameters. This should resolve the issues raised by the error message.

JUnit Error: Invalid Test Class 'Test.demoTest' - Method 'getIpAddr' Issues

原文地址: https://www.cveoy.top/t/topic/mTvB 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录