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); }
public async void WhenSaveDataAndOkThen200() { var controller = new FinancialTimesController(new FinancialServicesMock(Configuration.GetSection("MySettings:Configuration").Value)); // Act var result = (await controller.Get("Sep2016")); // Assert var okRequestResult = Assert.IsType <OkObjectResult>(result); Assert.IsType <OkObjectResult>(okRequestResult); }