Пример #1
0
        public void Customer_CalculateSuitabilityScore_WhenCustomerIsTedDziubaAndProductIsNerfCrossbow_ShouldBe9()
        {
            var          customer                 = new DiscountOffers.Customer("Ted Dziuba");
            var          product                  = new DiscountOffers.Product("Nerf Crossbow");
            var          suitabilityScore         = new DiscountOffers.SuitabilityScore(customer, product).Score;
            const double expectedSuitabilityScore = 9d;

            Assert.That(suitabilityScore, Is.EqualTo(expectedSuitabilityScore));
        }
Пример #2
0
        public void Customer_CalculateSuitabilityScore_WhenCustomerIsJackAbrahamAndProductIsiPad2_4_pack_ShouldBe6()
        {
            var          customer                 = new DiscountOffers.Customer("Jack Abraham");
            var          product                  = new DiscountOffers.Product("iPad 2 - 4-pack");
            var          suitabilityScore         = new DiscountOffers.SuitabilityScore(customer, product).Score;
            const double expectedSuitabilityScore = 6d;

            Assert.That(suitabilityScore, Is.EqualTo(expectedSuitabilityScore));
        }
Пример #3
0
        public void Customer_CalculateSuitabilityScore_WhenCustomerIsJohnEvansAndProductIsGirlScoutThinMints_ShouldBe6()
        {
            var          customer                 = new DiscountOffers.Customer("John Evans");
            var          product                  = new DiscountOffers.Product("Girl Scouts Thin Mints");
            var          suitabilityScore         = new DiscountOffers.SuitabilityScore(customer, product).Score;
            const double expectedSuitabilityScore = 6d;

            Assert.That(suitabilityScore, Is.EqualTo(expectedSuitabilityScore));
        }