public void SutDoesNotEqualAnonymousObject()
        {
            var sut       = new CurrentPropertyMortgageApplicationProcessor();
            var anonymous = new object();

            var actual = sut.Equals(anonymous);

            Assert.False(actual);
        }
        public void SutEqualsOther()
        {
            var sut   = new CurrentPropertyMortgageApplicationProcessor();
            var other = new CurrentPropertyMortgageApplicationProcessor();

            var actual = sut.Equals(other);

            Assert.True(actual);
        }
        public void ProduceOfferReturnsCorrectResult(
            string street,
            string postalCode,
            string country,
            int price,
            int size)
        {
            var sut         = new CurrentPropertyMortgageApplicationProcessor();
            var application = new MortgageApplication
            {
                CurrentProperty = new Property
                {
                    Address = new Address
                    {
                        Street     = street,
                        PostalCode = postalCode,
                        Country    = country
                    },
                    Price = price,
                    Size  = size
                }
            };

            var actual = sut.ProduceOffer(application);

            var expected = new IRendering[]
            {
                new TextRendering("Current property will be sold to finance new property."),
                new LineBreakRendering(),
            }
            .Concat(new PropertyProcessor {
                PriceText = "Estimated sales price"
            }.ProduceRenderings(application.CurrentProperty));

            Assert.Equal(expected, actual);
        }
        public void SutIsMortgageApplicationProcessor()
        {
            var sut = new CurrentPropertyMortgageApplicationProcessor();

            Assert.IsAssignableFrom <IMortgageApplicationProcessor>(sut);
        }