private Object newKortti(double arvo) throws Throwable { Reflex.MethodRef1<Object, Object, Double> ctor = klass.constructor().taking(double.class).withNiceError(); assertTrue( "Add class " + klassName + " constructor: public " + klassName + "(double initialBalance)", ctor.isPublic()); return ctor.invoke(arvo); }
@Points("77.1") @Test public void testConstructor() throws Throwable { Reflex.MethodRef1<Object, Object, Double> ctor = klass.constructor().taking(double.class).withNiceError(); assertTrue( "Add class " + klassName + " constructor: public " + klassName + "(double initialBalance)", ctor.isPublic()); ctor.invoke(4.0); }