public virtual void TestCloneDiff() { IElement elem = (IElement)NewChemObject(); IElement clone = (IElement)elem.Clone(); Assert.AreEqual("", ElementDiff.Diff(elem, clone)); }
public void TestMatchAgainstItself() { var m_element1 = new Mock <IElement>(); IElement element1 = m_element1.Object; string result = ElementDiff.Diff(element1, element1); AssertZeroLength(result); }
public override void TestClone() { IElement elem = (IElement)NewChemObject(); object clone = elem.Clone(); Assert.IsTrue(clone is IElement); // test that everything has been cloned properly string diff = ElementDiff.Diff(elem, (IElement)clone); Assert.IsNotNull(diff); Assert.AreEqual(0, diff.Length); }
public void TestDiff() { var m_element1 = new Mock <IElement>(); IElement element1 = m_element1.Object; var m_element2 = new Mock <IElement>(); IElement element2 = m_element2.Object; m_element1.SetupGet(n => n.Symbol).Returns("H"); m_element2.SetupGet(n => n.Symbol).Returns("C"); string result = ElementDiff.Diff(element1, element2); Assert.IsNotNull(result); Assert.AreNotSame(0, result.Length); AssertContains(result, "ElementDiff"); AssertContains(result, "H/C"); }