public void Equals_FalseForDifferentTypes() { var x = new TestValue("Foo", 42); var y = new TestValue2("Foo", 42); x.Equals(y).Should().BeFalse(); }
public override int GetHashCode() { unchecked { var hashCode = _testString != null?_testString.GetHashCode() : 0; hashCode = (hashCode * 397) ^ TestValue1; hashCode = (hashCode * 397) ^ TestValue2.GetHashCode(); return(hashCode); } }
public void ToString_FormatsComponents(string foo, int bar, string toString) { var x = new TestValue2(foo, bar); x.ToString().Should().Be(toString); }