public void TestGet_String() { var controller = new NumberController(); IHttpActionResult Result = controller.Get("sdsdsd;skpwepwewewewcsdcxc"); Assert.IsInstanceOfType(Result, typeof(BadRequestErrorMessageResult)); }
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>)); }
public void TestGet_CorrectNumber_WithExponential() { var controller = new NumberController(); IHttpActionResult Result = controller.Get("1234567842323.345e"); Assert.IsNotNull(Result); Assert.IsInstanceOfType(Result, typeof(BadRequestErrorMessageResult)); }
public async void GetBasicAll() { var controller = new NumberController(); var result = await controller.Get(); Assert.IsType <OkObjectResult>(result); }