public void TwoInstancesWithInheritingTypesAndTheSameIdAreEqual() { var lhs = new DocumentDbSession.DocumentKey <Base>("theId"); var rhs = new DocumentDbSession.DocumentKey <Inheritor>("theId"); lhs.Should().Be(rhs); rhs.Should().Be(lhs); lhs.GetHashCode().Should().Be(rhs.GetHashCode()); }
public void TwoInstancesOfTheSameTypeWithIdsDifferingOnlyInTrailingSpacesAreEqual() { var lhs = new DocumentDbSession.DocumentKey <Base>("theid "); var rhs = new DocumentDbSession.DocumentKey <Base>("theid"); lhs.Should().Be(rhs); rhs.Should().Be(lhs); lhs.GetHashCode().Should().Be(rhs.GetHashCode()); }
public void TwoInstancesOfTheSameTypeWithTheSameIdAreEqualAndHaveTheSameHashCode() { var lhs = new DocumentDbSession.DocumentKey <Base>("theId"); var rhs = new DocumentDbSession.DocumentKey <Base>("theId"); lhs.Should().Be(rhs); rhs.Should().Be(lhs); lhs.GetHashCode().Should().Be(rhs.GetHashCode()); }
public void TwoInstancesWithInheritingTypesAndTheSameIdAreEqual() { var lhs = new DocumentDbSession.DocumentKey<Base>("theId"); var rhs = new DocumentDbSession.DocumentKey<Inheritor>("theId"); lhs.Should().Be(rhs); rhs.Should().Be(lhs); lhs.GetHashCode().Should().Be(rhs.GetHashCode()); }
public void TwoInstancesOfTheSameTypeWithIdsDifferingOnlyInTrailingSpacesAreEqual() { var lhs = new DocumentDbSession.DocumentKey<Base>("theid "); var rhs = new DocumentDbSession.DocumentKey<Base>("theid"); lhs.Should().Be(rhs); rhs.Should().Be(lhs); lhs.GetHashCode().Should().Be(rhs.GetHashCode()); }
public void TwoInstancesOfTheSameTypeWithTheSameIdAreEqualAndHaveTheSameHashCode() { var lhs = new DocumentDbSession.DocumentKey<Base>("theId"); var rhs = new DocumentDbSession.DocumentKey<Base>("theId"); lhs.Should().Be(rhs); rhs.Should().Be(lhs); lhs.GetHashCode().Should().Be(rhs.GetHashCode()); }