コード例 #1
0
        public void TestToString()
        {
            IDifference result     = DoubleDifference.Construct("Foo", 1.0, 2.0);
            string      diffString = result.ToString();

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
コード例 #2
0
        public void TestToString()
        {
            IDifference result     = StringDifference.Construct("Foo", null, "bar");
            string      diffString = result.ToString();

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
コード例 #3
0
        public void TestToString()
        {
            IDifference result     = BooleanDifference.Construct("Foo", true, false);
            string      diffString = result.ToString();

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
コード例 #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);
        }
コード例 #5
0
        public void TestToString()
        {
            IDifference result     = AtomTypeHybridizationDifference.Construct("Foo", Hybridization.Unset, Hybridization.SP1);
            string      diffString = result.ToString();

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
コード例 #6
0
        public void TestToString()
        {
            IDifference result     = BondOrderDifference.Construct("Foo", BondOrder.Unset, BondOrder.Single);
            string      diffString = result.ToString();

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

            Assert.IsNotNull(diffString);
            AssertOneLiner(diffString);
        }
コード例 #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);
        }
コード例 #9
0
ファイル: BondDiff.cs プロジェクト: ch-hristov/NCDK
        /// <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());
            }
        }