Esempio n. 1
0
        public void TestMatchAgainstItself()
        {
            var    m_atom1 = new Mock <IChemObject>(); IChemObject atom1 = m_atom1.Object;
            string result = ChemObjectDiff.Diff(atom1, atom1);

            AssertZeroLength(result);
        }
Esempio n. 2
0
        public void TestDiff()
        {
            var m_atom1 = new Mock <IChemObject>(); IChemObject atom1 = m_atom1.Object;
            var m_atom2 = new Mock <IChemObject>(); IChemObject atom2 = m_atom2.Object;

            m_atom1.SetupGet(n => n.IsPlaced).Returns(false);
            m_atom1.SetupGet(n => n.IsVisited).Returns(false);
            m_atom2.SetupGet(n => n.IsPlaced).Returns(false);
            m_atom2.SetupGet(n => n.IsVisited).Returns(true);

            string result = ChemObjectDiff.Diff(atom1, atom2);

            Assert.IsNotNull(result);
            Assert.AreNotEqual(0, result.Length, "Expected non-zero-length result");
            AssertContains(result, "ChemObjectDiff");
            AssertContains(result, "F/T");
        }