public void Must_honor_exception_parameter(bool throwExceptionOnParserError) { var language = new CSharpCodeLanguage(throwExceptionOnParserError); var host = MockRepository.GenerateMock <RazorEngineHost>(); RazorCodeGenerator generator = language.CreateCodeGenerator("ClassName", "RootNamespace", "Template.cshtml", host); Assert.That(((CSharpCodeGenerator)generator).ThrowExceptionOnParserError, Is.EqualTo(throwExceptionOnParserError)); }
public void Must_create_csharpcodegenerator() { var language = new CSharpCodeLanguage(); var host = MockRepository.GenerateMock <RazorEngineHost>(); RazorCodeGenerator generator = language.CreateCodeGenerator("ClassName", "RootNamespace", "Template.cshtml", host); Assert.That(generator, Is.InstanceOf <CSharpCodeGenerator>()); }