public void Should_FailEqualityForDifferetObjectTypes() { var stringItem = new StringItem("lena", 4); var obj = "test"; Assert.IsFalse(stringItem.Equals(obj)); }
public void Should_FailEqualityForDifferentDataTypes() { var stringItem = new StringItem("lena", 4); var numericItem = new F4(5); Assert.IsFalse(stringItem.Equals(numericItem)); }
public void Should_BeEqualIfStringItemsEqual() { var stringItem = new StringItem("lena", 4); var stringItem2 = new StringItem("lena", 4); Assert.IsTrue(stringItem.Equals(stringItem2)); }
public void Should_FailEqualityForDifferentStringLength() { var stringItem = new StringItem("lena", 5); var stringItem2 = new StringItem("lena", 2); Assert.IsFalse(stringItem.Equals(stringItem2)); }
public void Should_FailEqualityForDifferentStringValues() { var stringItem = new StringItem("lena", 4); var stringItem2 = new StringItem("test", 4); Assert.IsFalse(stringItem.Equals(stringItem2)); }
public void Should_FailEqualityForNull() { var stringItem = new StringItem("lena", 4); Assert.IsFalse(stringItem.Equals(null)); }
public bool Equals(TestSubConfiguration other) => StringItem.Equals(other.StringItem) && NumberItem.Equals(other.NumberItem);