public void ShouldNotBeEqualToNull()
            {
                // arrange
                var targetId        = Guid.NewGuid();
                var stronglyTypedId = new IdFor <Order, Guid>(targetId);

                // act
                var result = stronglyTypedId.Equals(null);

                // assert
                result.Should().BeFalse();
            }
            public void ShouldNotBeEqualWhenValuesAreDifferent()
            {
                // arrange
                var stronglyTypedId        = new IdFor <Order, Guid>(Guid.NewGuid());
                var anotherStronglyTypedId = new IdFor <Order, Guid>(Guid.NewGuid());

                // act
                var result = stronglyTypedId.Equals(anotherStronglyTypedId);

                // assert
                result.Should().BeFalse();
            }
            public void ShouldBeEqualWhenIdIsTheSame()
            {
                // arrange
                var targetId        = Guid.NewGuid();
                var stronglyTypedId = new IdFor <Order, Guid>(targetId);

                // act
                var result = stronglyTypedId.Equals(stronglyTypedId);

                // assert
                result.Should().BeTrue();
            }
            public void ShouldNotBeEqualWhenEntitiesAreDifferent()
            {
                // arrange
                var targetId               = Guid.NewGuid();
                var stronglyTypedId        = new IdFor <Order, Guid>(targetId);
                var anotherStronglyTypedId = new IdFor <PricePosition, Guid>(targetId);

                // act
                var result = stronglyTypedId.Equals(anotherStronglyTypedId);

                // assert
                result.Should().BeFalse();
            }
            public void ShouldBeEqualWhenValuesAndEntitiesAreEqual()
            {
                // arrange
                var targetId               = Guid.NewGuid();
                var stronglyTypedId        = new IdFor <Order, Guid>(targetId);
                var anotherStronglyTypedId = new IdFor <Order, Guid>(targetId);

                // act
                var result = stronglyTypedId.Equals(anotherStronglyTypedId);

                // assert
                result.Should().BeTrue();
            }
            public void ShouldNotBeEqualWithIEntityIdWhenNull()
            {
                // arrange
                var targetId        = Guid.NewGuid();
                var stronglyTypedId = new IdFor <Order, Guid>(targetId);
                IEntityId <Order, Guid> anotherStronglyTypedId = null;

                // act
                var result = stronglyTypedId.Equals(anotherStronglyTypedId);

                // assert
                result.Should().BeFalse();
            }