BlogSharp.Core.Impl.Tests.Services.Template.TemplateSourceTests.Can_get_template_from_from_file_and_sets_correct_template_engine C# (CSharp) Method

Can_get_template_from_from_file_and_sets_correct_template_engine() private method

        public void Can_get_template_from_from_file_and_sets_correct_template_engine()
        {
            string file = "#templateengine(spark)\nyet another team";
            Stream fileStream = new MemoryStream();
            StreamWriter sw = new StreamWriter(fileStream);
            sw.Write(file);
            sw.Flush();
            fileStream.Position = 0;

            string fileName = "blah";
            fileService.Expect(x => x.OpenFileForRead(fileName)).Return(fileStream);
            ITemplate template = templateSource.GetTemplateFromFile("blah");
            templateEngineRegistry.AssertWasCalled(x => x.GetTemplateEngine("spark"));
            Assert.That(template.GetContent(), Is.EqualTo("yet another team"));
        }