public async Task GetTest_Area_Fail() { var controller = new FloodController(new FloodMonitoringService("", ""), _mapper); var result = await controller.Get("") as OkNegotiatedContentResult <IEnumerable <Flood> >;; Assert.IsFalse(result.Content.Any()); }
public async Task GetTest_Area_NULL_Fail() { var controller = new FloodController(new FloodMonitoringService("", ""), _mapper); var result = await controller.Get("") as NotFoundResult; Assert.IsNull(result); }
public async Task GetTest_Fail() { var controller = new FloodController(new FloodMonitoringService("", ""), _mapper); var result = await controller.Get() as NotFoundResult; Assert.IsTrue(result.GetType() == typeof(System.Web.Http.Results.NotFoundResult)); }
public async Task GetTest_Area_Success() { var controller = new FloodController(new FloodMonitoringService("", ""), _mapper); var result = await controller.Get("Thames") as OkNegotiatedContentResult <IEnumerable <Flood> >; Assert.IsNotNull(result.Content); }
public async Task GetTest_Success() { var controller = new FloodController(_service, _mapper); var result = await controller.Get() as OkNegotiatedContentResult <IEnumerable <Flood> >; Assert.IsNotNull(result.Content); }