예제 #1
0
        public async void WhenDataNotFound404()
        {
            var controller = new FinancialTimesController(new FinancialServicesMock(Configuration.GetSection("MySettings:Configuration").Value));

            // Act
            var result = (await controller.Get("Nov2025"));

            // Assert
            var notFoundResult = Assert.IsType <NotFoundResult>(result);

            Assert.IsType <NotFoundResult>(notFoundResult);
        }
예제 #2
0
        public async void WhenSaveNewDataOkAcceptable()
        {
            var controller = new FinancialTimesController(new FinancialServicesMock(Configuration.GetSection("MySettings:Configuration").Value));

            // Act
            var result = (await controller.SaveNewMonthFinance("Sep2016"));

            // Assert
            var okRequestResult = Assert.IsType <OkObjectResult>(result);

            Assert.IsType <OkObjectResult>(okRequestResult);
        }