public void Test_07_DefaultImplementation_Interface() { IExample Obj = Types.Instantiate <IExample>(false); Assert.IsNotNull(Obj); Assert.AreEqual(9.0, Obj.Eval(3)); }
public void Test_08_DefaultImplementation_AbstractClass() { IExample Obj = Types.Instantiate <Example>(false); Assert.IsNotNull(Obj); Assert.AreEqual(9.0, Obj.Eval(3)); }
public void Test_14_RegisterDefaultImplementation() { IExample Example1 = Types.Instantiate <IExample>(false); Assert.IsNotNull(Example1); Assert.AreEqual(9.0, Example1.Eval(3)); Types.RegisterDefaultImplementation(typeof(IExample), typeof(Example2)); IExample Example2 = Types.Instantiate <IExample>(false); Assert.IsNotNull(Example2); Assert.AreEqual(6.0, Example2.Eval(3)); Types.UnregisterDefaultImplementation(typeof(IExample), typeof(Example2)); IExample Example3 = Types.Instantiate <IExample>(false); Assert.IsNotNull(Example3); Assert.AreEqual(9.0, Example3.Eval(3)); }