Пример #1
0
        public void When_GetCalled_Return_OkResult()
        {
            PricingRepository pricingRepository = new PricingRepository();
            PricingController pricingController = new PricingController(pricingRepository);

            var okResult = pricingController.Compare(3000);

            Assert.IsType <OkObjectResult>(okResult.Result);
        }
Пример #2
0
        public void When_GetCalled_Return_Tariff()
        {
            PricingRepository pricingRepository = new PricingRepository();
            PricingController pricingController = new PricingController(pricingRepository);

            var okResult = pricingController.Compare(3000);
            var items    = Assert.IsType <List <Product> >(((ObjectResult)okResult.Result).Value);

            Assert.Equal(2, items.Count);
        }