@Test public void testGetStandardRetunsStandardContent() throws Exception { String expected = "standard content"; StringWriter standard = new StringWriter(); RenderContext renderContext = new RenderContextImpl(standard, null); Appendable current = renderContext.getCurrent(); current.append(expected); String actual = renderContext.getStandard(); assertEquals(expected, actual); }
@Test public void testGetStandardWhenStandardIsNull() throws Exception { RenderContext renderContext = new RenderContextImpl(null, null); String actual = renderContext.getStandard(); assertNull(actual); }