public void TestConstructor() { VectorFont.KerningPair pair = new VectorFont.KerningPair('A', 'B'); Assert.AreEqual('A', pair.Left); Assert.AreEqual('B', pair.Right); }
public void TestEqualityCheck() { VectorFont.KerningPair pair1 = new VectorFont.KerningPair('A', 'B'); VectorFont.KerningPair pair2 = new VectorFont.KerningPair('A', 'B'); VectorFont.KerningPair pair3 = new VectorFont.KerningPair('B', 'C'); Assert.IsTrue(pair1.Equals(pair2)); Assert.IsFalse(pair2.Equals(pair3)); }
public void TestGetHashCode() { VectorFont.KerningPair pair1 = new VectorFont.KerningPair('A', 'B'); VectorFont.KerningPair pair2 = new VectorFont.KerningPair('A', 'B'); // Can't check for inequality, always returning "123" as hash code would // be legal (even if not exactly the crown of efficiency :D) Assert.AreEqual(pair1.GetHashCode(), pair2.GetHashCode()); }
public void TestEqualityCheckAgainstIncompatibleType() { VectorFont.KerningPair pair = new VectorFont.KerningPair('A', 'B'); Assert.IsFalse(pair.Equals(new object())); }
public void TestConstructor() { VectorFont.KerningPair pair = new VectorFont.KerningPair('A' ,'B'); Assert.AreEqual('A', pair.Left); Assert.AreEqual('B', pair.Right); }