Пример #1
0
        public void SutDoesNotEqualAnonymousObject()
        {
            var sut       = new AdditionalApplicantsMortgageApplicationProcessor();
            var anonymous = new object();

            var actual = sut.Equals(anonymous);

            Assert.False(actual);
        }
Пример #2
0
        public void SutEqualsOther()
        {
            var sut   = new AdditionalApplicantsMortgageApplicationProcessor();
            var other = new AdditionalApplicantsMortgageApplicationProcessor();

            var actual = sut.Equals(other);

            Assert.True(actual);
        }
Пример #3
0
        public void ProduceOfferReturnsCorrectResultWithOneAdditionalApplicant(
            string name,
            string street,
            string postalCode,
            string country,
            int yearlyIncome,
            string taxAuthority)
        {
            var applicant = new Applicant
            {
                Contact = new Contact
                {
                    Name    = name,
                    Address = new Address
                    {
                        Street     = street,
                        PostalCode = postalCode,
                        Country    = country
                    }
                },
                YearlyIncome      = yearlyIncome,
                TaxationAuthority = taxAuthority
            };
            var application = new MortgageApplication();

            application.AdditionalApplicants.Add(applicant);
            var sut = new AdditionalApplicantsMortgageApplicationProcessor();

            var actual = sut.ProduceOffer(application);

            var expected = new IRendering[]
            {
                new BoldRendering("Additional applicants:"),
                new LineBreakRendering(),
                new BulletRendering("")
            }
            .Concat(new ApplicantProcessor().ProduceRenderings(applicant));

            Assert.Equal(expected, actual);
        }
Пример #4
0
        public void SutIsMortgageApplicationProcessor()
        {
            var sut = new AdditionalApplicantsMortgageApplicationProcessor();

            Assert.IsAssignableFrom <IMortgageApplicationProcessor>(sut);
        }