Example #1
0
        public void RenderViewWithoutPartial()
        {
            var viewData = new ViewDataDictionary {
                { "Message", "Holy Cow" }
            };
            var result = SparkTestHelpers.RenderPartialView(@"Home", "Index", viewData);

            Assert.That(result.Contains("The message is: Holy Cow"), Is.True, String.Format("Uh oh ... Could not find the holy cow on the index page. Result was: '{0}'", result));
        }
Example #2
0
        public void RenderViewWithPartial()
        {
            var result = SparkTestHelpers.RenderPartialView("Home", "WithPartial");

            Assert.That(result.Contains("Before Foo. | This is foo. | After Foo"), Is.True, String.Format("Uh oh ... Could not find the foo in the middle. Result was: '{0}'", result));
        }