Beispiel #1
0
        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());
        }
Beispiel #2
0
        public async Task GetTest_Area_NULL_Fail()
        {
            var controller = new FloodController(new FloodMonitoringService("", ""), _mapper);
            var result     = await controller.Get("") as NotFoundResult;

            Assert.IsNull(result);
        }
Beispiel #3
0
        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));
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        public async Task GetTest_Success()
        {
            var controller = new FloodController(_service, _mapper);
            var result     = await controller.Get() as OkNegotiatedContentResult <IEnumerable <Flood> >;

            Assert.IsNotNull(result.Content);
        }