@Test public void testIsRenderable() { Request requestContext = createMock(Request.class); expect(container.isValidDefinition("my.definition", requestContext)).andReturn(Boolean.TRUE); replay(requestContext, container); assertTrue(renderer.isRenderable("my.definition", requestContext)); assertFalse(renderer.isRenderable(null, requestContext)); verify(requestContext, container); }
public boolean isRenderable(String path, Request request) { return path != null && container.isValidDefinition(path, request); }
DefinitionRenderer implements Renderer { public boolean isRenderable(String path, Request request) { return path != null && container.isValidDefinition(path, request); } }
DefinitionRenderer implements Renderer { public boolean isRenderable(String path, Request request) { return path != null && container.isValidDefinition(path, request); } DefinitionRenderer(TilesContainer container); }
DefinitionRenderer implements Renderer { public boolean isRenderable(String path, Request request) { return path != null && container.isValidDefinition(path, request); } DefinitionRenderer(TilesContainer container); @Override void render(String path, Request request); boolean isRenderable(String path, Request request); }
DefinitionRenderer implements Renderer { public boolean isRenderable(String path, Request request) { return path != null && container.isValidDefinition(path, request); } DefinitionRenderer(TilesContainer container); @Override void render(String path, Request request); boolean isRenderable(String path, Request request);  }