public override bool Equals(object obj)
        {
            if (!(obj is Identifier))
            {
                return(false);
            }
            var o = (Identifier)obj;

            return(name.Equals(o.name) && typeReturned == o.typeReturned && uses.Equals(o.uses));
        }
Example #2
0
            public void Equals_ReturnsFalse_WhenTheUseCaseIsDifferentType()
            {
                // Arrange
                UseCase <RequestA, Response> useCase = Substitute.ForPartsOf <UseCase <RequestA, Response> >();
                UseCase <RequestB, Response> other   = Substitute.ForPartsOf <UseCase <RequestB, Response> >();
                bool actual;

                // Act
                actual = useCase.Equals(other);

                // Assert
                Assert.False(actual);
            }
Example #3
0
            public void Equals_ReturnsTrue_WhenTheUseCasesAreTheSame()
            {
                // Arrange
                UseCase <RequestA, Response> useCase = Substitute.ForPartsOf <UseCase <RequestA, Response> >();
                bool actual;

                // Act
                actual = useCase.Equals(useCase);

                // Assertface

                Assert.True(actual);
            }