private Index ( SmsRequest request ) : ActionResult | ||
request | SmsRequest | |
return | ActionResult |
public void EmptyArray_ReturnsBadResult() { var emptyIntArray = new int [] {}; var result = _sut.Index(emptyIntArray); result.Should().BeAssignableTo <BadRequestResult>(); }
public void Test1() { var controller = new HelloWorldController(); controller.Index(); Console.WriteLine("Working..............................."); }
public void Index() { HelloWorldController controller = new HelloWorldController(); ViewResult result = controller.Index() as ViewResult; Assert.IsNotNull(result); }
public void Return_Hello_World() { var controller = new HelloWorldController(); var result = controller.Index(); Assert.Equal("Hello, world!", result); }
public void HelloWorld_IndexTest_Success() { // Arrange _controllerUnderTest = new HelloWorldController(); // Act var result = _controllerUnderTest.Index(); // Assert Assert.IsNotNull(result); Assert.IsInstanceOfType(result, typeof(ViewResult)); }
public void Index() { // Arrange HelloWorldController controller = new HelloWorldController(); // Act ViewResult result = controller.Index() as ViewResult; // Assert Assert.AreEqual("Index", result.ViewBag.Message); }
public void Test1() { // Arrange var controller = new HelloWorldController(); var expectedResult = "This is my default action..."; // Act var result = controller.Index(); // Assert Assert.Equal(expectedResult, result); }
public void Get() { // Arrange HelloWorldController controller = new HelloWorldController(); // Act JsonResult <List <Data.Models.HelloWorld> > result = controller.Index() as JsonResult <List <Data.Models.HelloWorld> >; // Assert Assert.IsNotNull(result); Assert.AreEqual(1, result.Content.Count()); Assert.AreEqual("Hello World", result.Content.ElementAt(0).Description); }
public void ViewTest(string viewName) { var result = controller.Index() as ViewResult; Assert.Equal(viewName, result.ViewName); }
// dotnet test --filter "Category=ControllerTests" public void aboutNotNullTest() { var result = controller.Index() as ViewResult; Assert.NotNull(result); }
public void ReturnViewResultForIndex() { var result = _sut.Index(); Assert.IsType <ViewResult>(result); }