public void TestRenderPlainTextWithModel() { const string message = "Some model data!"; // Instantiate the view directly var view = new ExternalPrecompiled(); // Render it as a string var output = view.Render(message); // Verify that it looks correct Assert.IsTrue(output.Contains(message)); }
public void TestRenderPlainText() { const string message = "Some unit test message!"; // Instantiate the view directly var view = new ExternalPrecompiled(); // Set up the data that needs to be access by the view view.ViewBag.Message = message; // Render it as a string var output = view.Render(); // Verify that it looks correct Assert.IsTrue(output.Contains(message)); }