public static void basic_part_test() { var t = new Dummy.PartHolder(); do_part_test(t); t.Dispose(); }
public static void named_parts() { var obj = new Dummy.PartHolder(); var p1 = obj.GetPart("one"); var p2 = obj.GetPart("two"); Test.Assert(p1 is Dummy.TestObject); Test.AssertEquals("part_one", p1.GetName()); Test.Assert(p2 is Dummy.TestObject); Test.AssertEquals("part_two", p2.GetName()); obj.Dispose(); }
public static void test_object_deletion() { var obj = new Dummy.PartHolder(); var part = obj.OnePart; Test.AssertNotNull(part); part.Del(); Test.AssertNull(obj.OnePart); obj.Dispose(); }