我得到一个错误“NewTime(int,int)的方法未定义类型NewTime”

时间:2015-11-16 15:15:16

标签: java eclipse

我在下面的代码中遇到T2.NewTime后出现错误。

public class NewTimeJUnitTest {

  @Test
  public void testNewTime() // This runs the test using invalid hour value, and valid hour value.
  {
    NewTime T2 = new NewTime(16, 30);               // This contains an invalid value as the minutes. Which leads to the result being invalid.
    T2.subtractTime(03, 00);

    boolean actual = T2.NewTime (hh, mm);
    boolean expected = true;
    assertEquals(expected, actual);
  }
}

1 个答案:

答案 0 :(得分:0)

如果你打电话,构造函数NewTime没有任何匹配的参数。