public void Get_Tariff_Api_With_Max_Value_Result() { var controller = new TariffController(); var tariffs = controller.Get(10000000000000011102); Assert.IsType <OkObjectResult>(tariffs); }
public void Get_Tariff_Api_With_OK_Result() { var controller = new TariffController(); var tariffs = controller.Get(3500); Assert.IsType <OkObjectResult>(tariffs); }
public TariffControllerTest() { LoggerMock = new Mock <ILogger <TariffService> >(); MappingConfig = new MapperConfiguration(cfg => { cfg.AddProfile(new MappingProfile()); }); Mapper = MappingConfig.CreateMapper(); ITariffService provider = new TariffService(Mapper, LoggerMock.Object); _controller = new TariffController(provider); }
public void Initialise() { _customerService = Substitute.For <ICustomerService>(); _packageService = Substitute.For <IPackageService>(); _discountService = Substitute.For <IDiscountService>(); _tariffService = Substitute.For <ITariffService>(); _accountsService = Substitute.For <IAccountsService>(); _controller = new TariffController(_customerService, _accountsService, _packageService, _discountService, _tariffService); _customerService.GetAccount(Arg.Any <string>()).Returns(new CustomerAccount()); _tariffService.GetTariffInfo(Arg.Any <string>()).Returns(new TariffInfo { Tariffs = new List <Tariff>() }); }
public TariffControllerTests() { _mockTariffService = new Mock <ITariffService>(); _controller = new TariffController(_mockTariffService.Object); }