Exemplo n.º 1
0
        public void GetCustomerBestDiscountSpend2200FourYearsDualFuelBroadbandTypeHighSpeedShouldReturn5Percentange()
        {
            Mock <ITariffManager <List <IDiscount> > > initServiceMock = new Mock <ITariffManager <List <IDiscount> > >();

            initServiceMock.Setup(x => x.Manage()).Returns(ListDiscountSecond());

            _getCustomerBestDiscount = new GetCustomersBestDiscount(initServiceMock.Object);

            var result = _getCustomerBestDiscount.Manage(It.IsAny <string>());

            Assert.AreEqual(result, 10);
        }
Exemplo n.º 2
0
        public void GetCustomerBestDiscountSpend600TwoYearsOnlyElectricityBroadbandTypeBasicShouldReturn5Percentange()
        {
            Mock <ITariffManager <List <IDiscount> > > initServiceMock = new Mock <ITariffManager <List <IDiscount> > >();

            initServiceMock.Setup(x => x.Manage()).Returns(ListDiscount());

            _getCustomerBestDiscount = new GetCustomersBestDiscount(initServiceMock.Object);

            var result = _getCustomerBestDiscount.Manage(It.IsAny <string>());

            Assert.AreEqual(result, 0.5M);
        }