public void CustomActionFilter() { DemoController controller = new DemoController(); ContentResult result = controller.CustomActionFilter() as ContentResult; Assert.AreEqual("Custom Action Filter Overrides Firing on this Action", result.Content); }
public void AliasedAction() { DemoController controller = new DemoController(); ContentResult result = controller.AliasedAction() as ContentResult; Assert.AreEqual("This Action is accessible via it's alias - Alias.", result.Content); }
public void ViewBagAction() { DemoController controller = new DemoController(); ViewResult result = controller.ViewBagAction() as ViewResult; Assert.AreEqual("Adding to the ViewBag", result.ViewBag.TestViewBagProperty); Assert.AreEqual(true, result.ViewBag.TestBoolProperty); }