BlogSharp.Core.Impl.Tests.Services.Template.VelocityTemplateEngineTests.NVelocity_can_merge_template_with_context C# (CSharp) 메소드

NVelocity_can_merge_template_with_context() 개인적인 메소드

private NVelocity_can_merge_template_with_context ( ) : void
리턴 void
        public void NVelocity_can_merge_template_with_context()
        {
            ITemplate template = MockRepository.GenerateStub<ITemplate>();
            template.Expect(x => x.GetContent()).Return("$person.Name");
            var context = new Dictionary<string, object>();
            context["person"] = new {Name = "Mahmut"};
            StringWriter sw = new StringWriter();
            velocityEngine.Merge(template, context, sw);
            Assert.AreEqual("Mahmut", sw.GetStringBuilder().ToString());
        }