public void TestCloneUIDefCol() { //---------------Set up test pack------------------- IClassDef originalClassDef = LoadClassDef(); //---------------Execute Test ---------------------- UIDefCol newUIDefCol = originalClassDef.UIDefCol.Clone(); //---------------Test Result ----------------------- Assert.AreNotSame(newUIDefCol, originalClassDef.UIDefCol); Assert.IsTrue(newUIDefCol.Equals(originalClassDef.UIDefCol)); Assert.IsTrue(newUIDefCol == originalClassDef.UIDefCol); Assert.AreEqual(newUIDefCol["default"], originalClassDef.UIDefCol["default"]); Assert.AreNotSame(newUIDefCol["default"], originalClassDef.UIDefCol["default"]); //---------------Tear Down ------------------------- }
private static void AssertNotEqual(UIDefCol uiDefCol, UIDefCol uiDefCol2) { Assert.IsFalse(uiDefCol.Equals(uiDefCol2)); Assert.IsFalse(uiDefCol == uiDefCol2); Assert.IsTrue(uiDefCol != uiDefCol2); }
public void Test_NotEqualsWrongType() { UIDefCol uIDefCol1 = new UIDefCol(); Assert.IsFalse(uIDefCol1.Equals("FFFF")); }