Пример #1
0
        public virtual void TestAbsoluteDifference()
        {
            ICounter <string> c3 = Counters.AbsoluteDifference(c1, c2);

            NUnit.Framework.Assert.AreEqual(c3.GetCount("p"), 4.0);
            NUnit.Framework.Assert.AreEqual(c3.GetCount("q"), 4.0);
            NUnit.Framework.Assert.AreEqual(c3.GetCount("r"), 4.0);
            NUnit.Framework.Assert.AreEqual(c3.GetCount("s"), 4.0);
            NUnit.Framework.Assert.AreEqual(c3.GetCount("t"), 8.0);
            ICounter <string> c4 = Counters.AbsoluteDifference(c2, c1);

            NUnit.Framework.Assert.AreEqual(c4.GetCount("p"), 4.0);
            NUnit.Framework.Assert.AreEqual(c4.GetCount("q"), 4.0);
            NUnit.Framework.Assert.AreEqual(c4.GetCount("r"), 4.0);
            NUnit.Framework.Assert.AreEqual(c4.GetCount("s"), 4.0);
            NUnit.Framework.Assert.AreEqual(c4.GetCount("t"), 8.0);
        }