Example #1
0
        public void RenderTemplateWithoutPartial()
        {
            var viewData = new ViewDataDictionary {
                { "Message", "Holy Cow" }
            };
            var result = SparkTestHelpers.RenderTemplate(@"Home\Index.spark", 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 RenderTemplateWithPartial()
        {
            var result = SparkTestHelpers.RenderTemplate(@"Home\WithPartial.spark");

            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));
        }