コード例 #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());
        }
コード例 #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);
        }
コード例 #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));
        }
コード例 #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);
        }
コード例 #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);
        }