public virtual void TestDivideInPlace() { TwoDimensionalCounter <string, string> a = new TwoDimensionalCounter <string, string>(); a.SetCount("a", "b", 1); a.SetCount("a", "c", 1); a.SetCount("c", "a", 1); a.SetCount("c", "b", 1); Counters.DivideInPlace(a, a.TotalCount()); NUnit.Framework.Assert.AreEqual(1.0, a.TotalCount()); NUnit.Framework.Assert.AreEqual(0.25, a.GetCount("a", "b")); }
public virtual void TestTotalCount() { NUnit.Framework.Assert.AreEqual(c.TotalCount(), 21.0); }