@Test public void select() throws Exception { EdmProperty edmProperty = mock(EdmProperty.class); when(edmProperty.getName()).thenReturn("property"); final DebugTabUri tab = new DebugTabUri(new UriInfoImpl().setKind(UriInfoKind.all) .setSystemQueryOption(new SelectOptionImpl().setSelectItems(Arrays.asList( (SelectItem) new SelectItemImpl().setStar(true), new SelectItemImpl().setResourcePath( new UriInfoImpl().setKind(UriInfoKind.resource) .addResourcePart(new UriResourcePrimitivePropertyImpl(edmProperty))))))); assertEquals("{\"kind\":\"all\",\"select\":[\"*\",\"property\"]}", createJson(tab)); assertEquals("<h2>Kind</h2>\n" + "<p>all</p>\n" + "<h2>Selected Properties</h2>\n" + "<ul>\n" + "<li>*</li>\n" + "<li>property</li>\n" + "</ul>\n", createHtml(tab)); }
@Override public String getName() { return "URI"; }
DebugTabUri implements DebugTab { @Override public String getName() { return "URI"; } }
DebugTabUri implements DebugTab { @Override public String getName() { return "URI"; } DebugTabUri(final UriInfo uriInfo); }
DebugTabUri implements DebugTab { @Override public String getName() { return "URI"; } DebugTabUri(final UriInfo uriInfo); @Override String getName(); @Override void appendJson(final JsonGenerator gen); @Override void appendHtml(final Writer writer); }
DebugTabUri implements DebugTab { @Override public String getName() { return "URI"; } DebugTabUri(final UriInfo uriInfo); @Override String getName(); @Override void appendJson(final JsonGenerator gen); @Override void appendHtml(final Writer writer);  }