public static void basic_parent_managed_inherit() { test.ITesting parent = new Derived(null); test.ITesting child = new Derived(parent); Test.AssertEquals(parent, child.GetParent()); test.ITesting parent_from_cast = test.Testing.static_cast(child.GetParent()); Test.AssertEquals(parent, parent_from_cast); }
private static void do_part_test(test.ITesting t) { var p1 = t.Part1; var p2 = t.Part2; Test.Assert(p1 is test.Testing); Test.AssertEquals("part1", p1.GetName()); Test.Assert(p2 is test.Testing); Test.AssertEquals("part2", p2.GetName()); }
public static void basic_parent() { test.ITesting parent = new test.Testing(null); test.ITesting child = new test.Testing(parent); Test.AssertEquals(parent, child.GetParent()); test.ITesting parent_retrieved = test.Testing.static_cast(child.GetParent()); Test.AssertEquals(parent, parent_retrieved); }
// // Test cases: // public static void return_same_object() { test.ITesting testing = new test.Testing(); test.ITesting o1 = testing.ReturnObject(); Test.Assert(o1.raw_handle != IntPtr.Zero); Test.Assert(o1.raw_handle == testing.raw_handle); test.ITesting o2 = o1.ReturnObject(); Test.Assert(o2.raw_handle != IntPtr.Zero); Test.Assert(o2.raw_handle == o1.raw_handle); }
public static void event_with_object_payload() { test.ITesting obj = new test.Testing(); test.ITesting received_obj = null; obj.EvtWithObjEvt += (object sender, EvtWithObjEvt_Args e) => { received_obj = e.arg; }; test.ITesting sent_obj = new test.Testing(); obj.EmitEventWithObj(sent_obj); Test.AssertEquals(sent_obj, received_obj); }
public Derived(test.ITesting parent = null) : base(parent) { }
public Derived(test.ITesting parent = null, test.TestingInherit.ConstructingMethod cb = null) : base(parent, cb) { }