public void Simple_NullClassMultiplesTest() { MultiSameClass test = new MultiSameClass(); test.stest1 = null; test.stest2 = null; test.stest3 = null; MyTestSerializeRun(test); MultiSameClass result = MyTestDeserializeRun<MultiSameClass>(); Assert.IsTrue(result.stest1 == null && result.stest2 == null && result.stest3 == null); }
public void Complex_SameClassMultiplesTest() { MultiSameClass test = new MultiSameClass(); test.stest1 = new SimpleTest(); test.stest1.Setup(); test.stest2 = test.stest1; // these two will now equal the first, and there should only be one serialized with 3 FK links test.stest3 = test.stest1; MyTestSerializeRun(test); MultiSameClass result = MyTestDeserializeRun<MultiSameClass>(); Assert.AreEqual(test, result); }