public void TestGetHashcode(string item1, string item2, bool item3, bool item4, bool item5) { var fst = new TableColumnMetadata(item1, item2, item3, item4, item5); var snd = new TableColumnMetadata(item1, item2, item3, item4, item5); Assert.Equal(snd.GetHashCode(), fst.GetHashCode()); }
public void TestGetHashcode() { Tuple <string, string, bool, bool, bool>[] tests = { Tuple.Create("", "", false, false, false), Tuple.Create("a", "", false, false, false), Tuple.Create("a", "b", false, false, false), Tuple.Create("a", "b", true, false, false), Tuple.Create("a", "b", true, true, false), Tuple.Create("a", "b", true, true, true), }; foreach (var test in tests) { var fst = new TableColumnMetadata(test.Item1, test.Item2, test.Item3, test.Item4, test.Item5); var snd = new TableColumnMetadata(test.Item1, test.Item2, test.Item3, test.Item4, test.Item5); Assert.Equal(fst.GetHashCode(), snd.GetHashCode()); } }
public void TestGetHashcode() { Tuple<string, string, bool, bool, bool>[] tests = { Tuple.Create("", "", false, false, false), Tuple.Create("a", "", false, false, false), Tuple.Create("a", "b", false, false, false), Tuple.Create("a", "b", true, false, false), Tuple.Create("a", "b", true, true, false), Tuple.Create("a", "b", true, true, true), }; foreach (var test in tests) { var fst = new TableColumnMetadata(test.Item1, test.Item2, test.Item3, test.Item4, test.Item5); var snd = new TableColumnMetadata(test.Item1, test.Item2, test.Item3, test.Item4, test.Item5); Assert.Equal(fst.GetHashCode(), snd.GetHashCode()); } }