public void It_will_throw_when_text_writer_is_null() { HtmlClassFormatter formatter = new HtmlClassFormatter(); Exception ex = Record.Exception(() => formatter.WriteFooter(new StubStyleSheet(), new StubLanguage(), null)); Assert.IsType <ArgumentNullException>(ex); Assert.Equal("textWriter", ((ArgumentNullException)ex).ParamName); }
public void It_will_throw_when_text_writer_is_null() { HtmlClassFormatter formatter = new HtmlClassFormatter(); Exception ex = Record.Exception(() => formatter.WriteFooter(new StubStyleSheet(), new StubLanguage(), null)); Assert.IsType<ArgumentNullException>(ex); Assert.Equal("textWriter", ((ArgumentNullException)ex).ParamName); }
public void It_will_write_the_footer() { HtmlClassFormatter formatter = new HtmlClassFormatter(); StubStyleSheet stubStyleSheet = new StubStyleSheet { Name__getValue = "fnord", Styles__getValue = new StyleDictionary { } }; StubLanguage stubLanguage = new StubLanguage { CssClassName_getValue = "fnord" }; StubTextWriter stubTextWriter = new StubTextWriter(); formatter.WriteFooter(stubStyleSheet, stubLanguage, stubTextWriter); Assert.Equal("</pre></div>", stubTextWriter.Write__buffer); }
public void It_will_write_the_footer() { HtmlClassFormatter formatter = new HtmlClassFormatter(); StubStyleSheet stubStyleSheet = new StubStyleSheet { Name__getValue = "fnord", Styles__getValue = new StyleDictionary { } }; StubLanguage stubLanguage = new StubLanguage { CssClassName_getValue = "fnord" }; StubTextWriter stubTextWriter = new StubTextWriter(); formatter.WriteFooter(stubStyleSheet, stubLanguage, stubTextWriter); Assert.Equal("</pre></div>", stubTextWriter.Write__buffer.Trim()); }