public void TwoInstancesOfUnrelatedTypesAndSameIdAreNotEqual()
        {
            var lhs = new DocumentDbSession.DocumentKey <Base>("theId");
            var rhs = new DocumentDbSession.DocumentKey <Unrelated>("theId");

            lhs.Should().NotBe(rhs);
            rhs.Should().NotBe(lhs);
        }
        public void TwoInstancesWithInheritingTypesAndDifferingIdsAreNotEqual()
        {
            var lhs = new DocumentDbSession.DocumentKey<Base>("theFirstId");
            var rhs = new DocumentDbSession.DocumentKey<Inheritor>("theSecondId");

            lhs.Should().NotBe(rhs);
            rhs.Should().NotBe(lhs);
        }
        public void TwoInstancesWithInheritingTypesAndDifferingIdsAreNotEqual()
        {
            var lhs = new DocumentDbSession.DocumentKey <Base>("theFirstId");
            var rhs = new DocumentDbSession.DocumentKey <Inheritor>("theSecondId");

            lhs.Should().NotBe(rhs);
            rhs.Should().NotBe(lhs);
        }
        public void TwoInstancesOfTheSameTypeWithDifferentIdsAreNotEqual()
        {
            var lhs = new DocumentDbSession.DocumentKey <Base>("theFirstId");
            var rhs = new DocumentDbSession.DocumentKey <Base>("theSecondId");

            lhs.Should().NotBe(rhs);
            rhs.Should().NotBe(lhs);
        }
        public void TwoInstancesOfTheSameTypeWithDifferentIdsAreNotEqual()
        {
            var lhs = new DocumentDbSession.DocumentKey<Base>("theFirstId");
            var rhs = new DocumentDbSession.DocumentKey<Base>("theSecondId");

            lhs.Should().NotBe(rhs);
            rhs.Should().NotBe(lhs);
        }
        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());
        }
        public void TwoInstancesOfUnrelatedTypesAndSameIdAreNotEqual()
        {
            var lhs = new DocumentDbSession.DocumentKey<Base>("theId");
            var rhs = new DocumentDbSession.DocumentKey<Unrelated>("theId");

            lhs.Should().NotBe(rhs);
            rhs.Should().NotBe(lhs);
        }