示例#1
0
        public void TestGet_String()
        {
            var controller           = new NumberController();
            IHttpActionResult Result = controller.Get("sdsdsd;skpwepwewewewcsdcxc");

            Assert.IsInstanceOfType(Result, typeof(BadRequestErrorMessageResult));
        }
示例#2
0
        public void TestGet_CorrectNumberNegativeSign()
        {
            var controller           = new NumberController();
            IHttpActionResult Result = controller.Get("-12345678");

            Assert.IsNotNull(Result);
            Assert.IsInstanceOfType(Result, typeof(System.Web.Http.Results.OkNegotiatedContentResult <string>));
        }
示例#3
0
        public void TestGet_CorrectNumber_WithExponential()
        {
            var controller           = new NumberController();
            IHttpActionResult Result = controller.Get("1234567842323.345e");

            Assert.IsNotNull(Result);
            Assert.IsInstanceOfType(Result, typeof(BadRequestErrorMessageResult));
        }
示例#4
0
        public async void GetBasicAll()
        {
            var controller = new NumberController();

            var result = await controller.Get();

            Assert.IsType <OkObjectResult>(result);
        }