TestRenderTemplates() public method

public TestRenderTemplates ( ) : string
return string
Ejemplo n.º 1
0
        public void RenderTemplate_CanReturnRenderedTemplatesAsString()
        {
            // arrange
            var message = new RazorMailMessageTester(ObjectMother.Subject);

            // act
            message.Templates.Add("This is a test template by @Model.Name.");
            message.Set.Name = "William Duffy";
            var result = message.TestRenderTemplates();

            // assert
            Assert.That(result, Is.EqualTo("This is a test template by William Duffy."));
        }