コード例 #1
0
        public void GetListAsync_ShouldNotAllowNegavtiveLimit()
        {
            //arrange
            var controller = new CoordinateListController(_cooServiceMock.Object);

            //act
            var result = controller.GetListAsync(-10, 10).Result;

            //verify
            Assert.IsType <BadRequestObjectResult>(result);
        }
コード例 #2
0
        public void GetListAsync_ShouldNotAllowInvalidSortByENum()
        {
            //arrange
            var controller = new CoordinateListController(_cooServiceMock.Object);

            //act
            var result = controller.GetListAsync(0, 0, (SortBy)152).Result;

            //verify
            Assert.IsType <BadRequestObjectResult>(result);
        }