Verbesserung des Tests OLFun2.
This commit is contained in:
parent
9d2d076215
commit
5071406b3f
@ -47,29 +47,29 @@ public class OLFun2Test {
|
||||
@Test
|
||||
public void mExistsWithIntegerInteger() throws Exception{
|
||||
Method m = classToTest.getDeclaredMethod("m", classFun1IntInt);
|
||||
assertEquals(Integer.class, m.getReturnType());
|
||||
assertNotNull(m);
|
||||
assertEquals(Integer.class, m.getReturnType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mExistsWithIntegerDouble() throws Exception{
|
||||
Method m = classToTest.getDeclaredMethod("m", classFun1IntDouble);
|
||||
assertEquals(Double.class, m.getReturnType());
|
||||
assertNotNull(m);
|
||||
assertEquals(Double.class, m.getReturnType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mExistsWithDoubleInteger() throws Exception{
|
||||
Method m = classToTest.getDeclaredMethod("m", classFun1DoubleInt);
|
||||
assertEquals(Integer.class, m.getReturnType());
|
||||
assertNotNull(m);
|
||||
assertEquals(Integer.class, m.getReturnType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mExistsWithDoubleDouble() throws Exception{
|
||||
Method m = classToTest.getDeclaredMethod("m", classFun1DoubleDouble);
|
||||
assertEquals(Double.class, m.getReturnType());
|
||||
assertNotNull(m);
|
||||
assertEquals(Double.class, m.getReturnType());
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -4,7 +4,7 @@ public class OLFunTest{
|
||||
Integer i = olFun2.m((Integer x) -> x);
|
||||
i = olFun2.m((Double x) -> x.intValue());
|
||||
|
||||
Double d = olFun2.m((Integer x) -> (Double) Double.valueOf(x));
|
||||
Double d = olFun2.m((Integer x) -> Double.valueOf(x));
|
||||
d = olFun2.m((Double x) -> x);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user