public void WhenEqualsWithDifferentStringValue_ThenReturnsFalse() { // ReSharper disable once SuspiciousTypeConversion.Global var result = new TestMultiValueObject("avalue", 25, true).Equals("adifferentvalue"); result.Should().BeFalse(); }
public void WhenOperatorEqualsWithSameValue_ThenReturnsTrue() { // ReSharper disable once EqualExpressionComparison var result = new TestMultiValueObject("avalue1", 25, true) == new TestMultiValueObject("avalue1", 25, true); result.Should().BeTrue(); }
public void WhenEqualsWithSameValueInMultiValueObject_ThenReturnsTrue() { var result = new TestMultiValueObject("avalue1", 25, true).Equals(new TestMultiValueObject("avalue1", 25, true)); result.Should().BeTrue(); }
public void WhenEqualsWithDifferentValueInMultiValueObject_ThenReturnsFalse() { var result = new TestMultiValueObject("avalue1", 25, true).Equals(new TestMultiValueObject("avalue2", 50, false)); result.Should().BeFalse(); }
public void WhenEqualsWithSameStringValue_ThenReturnsTrue() { // ReSharper disable once SuspiciousTypeConversion.Global var result = new TestMultiValueObject("astringvalue", 25, true) .Equals("{\"Val1\":\"astringvalue\",\"Val2\":25,\"Val3\":true}"); result.Should().BeTrue(); }
public void WhenOperatorEqualsWithDifferentValue_ThenReturnsFalse() { var result = new TestMultiValueObject("avalue1", 25, true) == new TestMultiValueObject("avalue2", 25, true); result.Should().BeFalse(); }
public void WhenEqualsWithNullStringValue_ThenReturnsFalse() { var result = new TestMultiValueObject("avalue", 25, true).Equals((string)null); result.Should().BeFalse(); }