MyInteger { public boolean isEven() { return value % 2 == 0; } MyInteger(int value); int get(); boolean isEven(); boolean isOdd(); boolean isPrime(); static boolean isEven(int v); static boolean isOdd(int v); static boolean isPrime(int v); static boolean isEven(MyInteger v); static boolean isOdd(MyInteger v); static boolean isPrime(MyInteger v); @Override boolean equals(Object o); boolean equals(int v); boolean equals(MyInteger v); static int parseInt(char[] c); static int parseInt(String c); @Override String toString();  }
@Test @DisplayName("测试isEven()普通成员函数") void testIsEvenVoid() { for (MyInteger mi : miEven) { assertTrue(mi.isEven()); } }
@Test @DisplayName("测试isEven(int)静态成员函数") void testIsEvenInt() { for (int e : even) { assertTrue(MyInteger.isEven(e)); } }
@Test @DisplayName("测试isEven(MyInteger)静态成员函数") void testIsEvenMI(){ for(MyInteger mi: miEven){ assertTrue(MyInteger.isEven(mi)); } }