Example #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());
        }
Example #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);
        }
Example #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));
        }
Example #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);
        }
Example #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);
        }