コード例 #1
0
        public void SutDoesNotEqualAnonymousObject()
        {
            var sut       = new ConditionalMortgageApplicationProcessor();
            var anonymous = new object();

            var actual = sut.Equals(anonymous);

            Assert.False(actual);
        }
コード例 #2
0
        public void SutEqualsOtherWithSameDependencies()
        {
            var sut = new ConditionalMortgageApplicationProcessor
            {
                Specification  = new Mock <IMortgageApplicationSpecification>().Object,
                TruthProcessor = new Mock <IMortgageApplicationProcessor>().Object
            };
            var other = new ConditionalMortgageApplicationProcessor
            {
                Specification  = sut.Specification,
                TruthProcessor = sut.TruthProcessor
            };

            var actual = sut.Equals(other);

            Assert.True(actual);
        }
コード例 #3
0
        public void SutDoesNotEqualOtherWithDifferentTruthProcessor()
        {
            var sut = new ConditionalMortgageApplicationProcessor
            {
                Specification  = new Mock <IMortgageApplicationSpecification>().Object,
                TruthProcessor = new Mock <IMortgageApplicationProcessor>().Object
            };
            var other = new ConditionalMortgageApplicationProcessor
            {
                Specification  = sut.Specification,
                TruthProcessor = new Mock <IMortgageApplicationProcessor>().Object
            };

            var actual = sut.Equals(other);

            Assert.False(actual);
        }