public void TestHashCodeTrue() { Formula a = new Formula("2 + X3"); int hashCodeA = a.GetHashCode(); Formula b = new Formula("2+X3"); int hashCodeB = b.GetHashCode(); Assert.AreEqual(hashCodeA, hashCodeB); }
public void TestGetHashCode() { Formula f1 = new Formula("x1+y2", Normalize, Validate); Formula f2 = new Formula("X1+Y2"); Assert.IsTrue(f1.GetHashCode() == f2.GetHashCode()); }
public void Test45() { Formula f1 = new Formula("2*5"); Formula f2 = new Formula("3/8*2+(7)"); Assert.IsTrue(f1.GetHashCode() != f2.GetHashCode()); }
public void Test44() { Formula f1 = new Formula("2*5"); Formula f2 = new Formula("2*5"); Assert.IsTrue(f1.GetHashCode() == f2.GetHashCode()); }
public void TestGetHashCode2() { Formula testFormula1 = new Formula("a/b"); Formula testFormula2 = new Formula("b/a"); Assert.IsFalse(testFormula1.GetHashCode() == testFormula2.GetHashCode()); }
public void TestGetHashCode1() { Formula testFormula1 = new Formula("a/b"); Formula testFormula2 = new Formula("a/b"); Assert.IsTrue(testFormula1.GetHashCode() == testFormula2.GetHashCode()); }
public void GetHashcodeTest() { Formula f1 = new Formula("x+2"); Formula f2 = new Formula("x+2"); Assert.IsTrue(f1.GetHashCode() == f2.GetHashCode()); }
public void PublicTestGetHashCode4WithNormalizer() { Formula f1 = new Formula("5+A1"); Formula f2 = new Formula("5+a1", s =>s.ToUpper(), s => true); Assert.AreEqual(f1.GetHashCode(), f2.GetHashCode()); }
public void PublicTestGetHashCode4() { Formula f1 = new Formula("5+A1"); Formula f2 = new Formula("5+a1"); Assert.AreNotEqual(f1.GetHashCode(), f2.GetHashCode()); }
public void PublicTestGetHashCode3() { Formula f1 = new Formula("5+6e+3"); Formula f2 = new Formula("5+6000"); Assert.AreNotEqual(f1.GetHashCode(), f2.GetHashCode()); }
public void PublicTestGetHashCode1() { Formula f1 = new Formula("5+A1-72/8+1/2"); Formula f2 = new Formula("5 +A1 - 72 / 8 + 1 / 2"); Assert.AreEqual(f1.GetHashCode(), f2.GetHashCode()); }
public void TestHashCodeFalse() { Formula a = new Formula("2 + 3"); int hashCodeA = a.GetHashCode(); Formula b = new Formula("3 + 2"); int hashCodeB = b.GetHashCode(); Assert.AreNotEqual(hashCodeA, hashCodeB); }
public void HashCodeNotEqual() { Formula f = new Formula("x1 + y2 + z3"); int fHash = f.GetHashCode(); Formula g = new Formula("X1 + Y2 + Z3"); int gHash = g.GetHashCode(); Assert.AreNotEqual(gHash, fHash); }
public void HashCodeEqualWithUpper() { Formula f = new Formula("x1 + y2 + z3", s => s.ToUpper(), s => true); int fHash = f.GetHashCode(); Formula g = new Formula("X1 + Y2 + Z3"); int gHash = g.GetHashCode(); Assert.AreEqual(gHash, fHash); }