public void TestToString()
        {
            IDifference result     = DoubleDifference.Construct("Foo", 1.0, 2.0);
            string      diffString = result.ToString();

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
        public void TestToString()
        {
            IDifference result     = StringDifference.Construct("Foo", null, "bar");
            string      diffString = result.ToString();

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
        public void TestToString()
        {
            IDifference result     = BooleanDifference.Construct("Foo", true, false);
            string      diffString = result.ToString();

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
Beispiel #4
0
        public void TestToString()
        {
            IDifference result     = BooleanArrayDifference.Construct("Foo", new bool[] { true }, new bool[] { false });
            string      diffString = result.ToString();

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
Beispiel #5
0
        public void TestToString()
        {
            IDifference result     = AtomTypeHybridizationDifference.Construct("Foo", Hybridization.Unset, Hybridization.SP1);
            string      diffString = result.ToString();

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
        public void TestToString()
        {
            IDifference result     = BondOrderDifference.Construct("Foo", BondOrder.Unset, BondOrder.Single);
            string      diffString = result.ToString();

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
Beispiel #7
0
        public void TestToString()
        {
            IDifference result     = IntegerDifference.Construct("Foo", 1, 2);
            string      diffString = result.ToString();

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
Beispiel #8
0
        public void TestToString()
        {
            Vector3     bar        = new Vector3(1.0, 5.0, 8.3);
            IDifference result     = Point3DDifference.Construct("Foo", null, bar);
            string      diffString = result.ToString();

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
Beispiel #9
0
        /// <summary>
        /// Compare two <see cref="IChemObject"/> classes and return the difference as a <see cref="string"/>.
        /// </summary>
        /// <param name="first">the first of the two classes to compare</param>
        /// <param name="second">the second of the two classes to compare</param>
        /// <returns>a <see cref="string"/> representation of the difference between the first and second <see cref="IChemObject"/>.</returns>
        public static string Diff(IChemObject first, IChemObject second)
        {
            IDifference diff = Difference(first, second);

            if (diff == null)
            {
                return("");
            }
            else
            {
                return(diff.ToString());
            }
        }