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

            var actual = sut.Equals(anonymous);

            Assert.False(actual);
        }
コード例 #2
0
        public void SutEqualsOther()
        {
            var sut = new PrimaryApplicantMortgageApplicationProcessor();
            var other = new PrimaryApplicantMortgageApplicationProcessor();

            var actual = sut.Equals(other);

            Assert.True(actual);
        }
コード例 #3
0
        public void ProduceOfferReturnsCorrectResult(
            string name,
            string street,
            string postalCode,
            string country,
            int yearlyIncome,
            string taxAuthority)
        {
            var sut = new PrimaryApplicantMortgageApplicationProcessor();
            var application = new MortgageApplication
            {
                PrimaryApplicant = new Applicant
                {
                    Contact = new Contact
                    {
                        Name = name,
                        Address = new Address
                        {
                            Street = street,
                            PostalCode = postalCode,
                            Country = country
                        }
                    },
                    YearlyIncome = yearlyIncome,
                    TaxationAuthority = taxAuthority
                }
            };

            var actual = sut.ProduceOffer(application);

            var expected = new IRendering[]
            {
                new BoldRendering("Primary applicant:")
            }
            .Concat(new ApplicantProcessor().ProduceRenderings(
                application.PrimaryApplicant));
            Assert.Equal(expected, actual);
        }
コード例 #4
0
 public void SutIsMortgageApplicationProcessor()
 {
     var sut = new PrimaryApplicantMortgageApplicationProcessor();
     Assert.IsAssignableFrom<IMortgageApplicationProcessor>(sut);
 }