public void CloneFromChild() { var orig = new SettingsB(); orig.IntegerFieldA = 4; var copy = orig.CloneAs <SettingsA>(); Assert.IsNotNull(copy); Assert.AreEqual(4, copy.IntegerFieldA); }
public void CopyFromParent_Field_ValueType() { var orig = new SettingsA(); var copy = new SettingsB(); orig.IntegerFieldA = 8; copy.CopyValuesFrom(orig); Assert.AreEqual(8, copy.IntegerFieldA); }
public void CopyFromSibling_Field_ValueType() { var orig = new SettingsB(); var copy = new SettingsC(); orig.IntegerFieldA = 9; copy.CopyValuesFrom(orig); Assert.AreEqual(9, copy.IntegerFieldA); }
public void CopyFromChild_Field_ValueType() { var orig = new SettingsB(); var copy = new SettingsA(); orig.IntegerFieldA = 7; SettingsPrototype.CopyValuesFrom(copy, orig); Assert.AreEqual(7, copy.IntegerFieldA); }