Verbesserung des Tests OLFun2.

This commit is contained in:
Etienne Zink 2022-05-12 08:47:46 +02:00
parent 9d2d076215
commit 5071406b3f
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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);
}
}