public void EmptyClassDocument() { var root = new EmptyClass(); var doc = Serializer.Serialize(root, null); Assert.NotNull(doc); Assert.AreEqual("!Test.EmptyClass{}", doc); var readRoot = Serializer.Deserialize <EmptyClass>(doc, null); Assert.True(root.IsSame(readRoot)); }
public void EmptyClass() { var value = new EmptyClass(); var w = new Writer(); var cs = new ClassSerializer(typeof(EmptyClass)); Assert.True(cs.Write(w, value, null)); Assert.AreEqual("!Test.EmptyClass{}", w.ToString()); var r = new Reader(w.ToString()); var result = cs.Read(r, null, null) as EmptyClass; Assert.IsNotNull(result); Assert.IsFalse(r.AnyLeft, "Any characters left."); Assert.IsTrue(value.IsSame(result), "Read back value is not the same."); }
public DerivedClass(bool init) { MyEmptyClass = init ? new DerivedClass(false) : null; }
public CascadedClass(PropertyClass myPropertyInstance) { MyEmptyClass = new EmptyClass(); MyPropertyClass = myPropertyInstance; }
public CascadedClass() { MyEmptyClass = new EmptyClass(); MyPropertyClass = new PropertyClass(); }
public bool IsSame(EmptyClass other) { return(true); }