예제 #1
0
  @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);
  }
예제 #2
0
 @Test
 public void testGetStandardWhenStandardIsNull() throws Exception {
   RenderContext renderContext = new RenderContextImpl(null, null);
   String actual = renderContext.getStandard();
   assertNull(actual);
 }