public void TestStringInput() { var strNode = new StringInput { Value = "Enter", X = 400 }; //To check if base Serialization method is being called //Assert initial values Assert.AreEqual(400, strNode.X); Assert.AreEqual("Enter", strNode.Value); //Serialize node and then change values XmlDocument xmlDoc = new XmlDocument(); XmlElement serializedEl = strNode.Serialize(xmlDoc, SaveContext.Undo); strNode.X = 250; strNode.Value = "Exit"; //Assert new changes Assert.AreEqual(250, strNode.X); Assert.AreEqual("Exit", strNode.Value); //Deserialize and aasert old values strNode.Deserialize(serializedEl, SaveContext.Undo); Assert.AreEqual(400, strNode.X); Assert.AreEqual("Enter", strNode.Value); }