@Test public void testTranslate_changeset() { EntityReferenceTranslator translator = new EntityReferenceTranslator(getProject(), "changeset", new SimpleCache()); RestInvocations.loadMetadata(handler, "changeset"); handler.addRequest(false, "GET", "/qcbin/rest/domains/domain/projects/project/changesets?fields=id,date,owner,changed-file-count,has-defect-linkage,has-linkage,has-requirement-linkage,changed-line-count,description,vts,rev,status-message&query={id[941]}&order-by={}", 200) .content("entity_changeset.xml"); handler.async(); String name = translator.translate("941", new ValueCallback() { @Override public void value(final String value) { handler.done(new Runnable() { @Override public void run() { Assert.assertEquals("2012-07-12 04:10:09 dev@null: Fixing something", value); } }); } }); Assert.assertNull(name); }
@Override public String translate(String value, ValueCallback callback) { return new Execution(callback).perform(value); }
EntityReferenceTranslator implements Translator { @Override public String translate(String value, ValueCallback callback) { return new Execution(callback).perform(value); } }
EntityReferenceTranslator implements Translator { @Override public String translate(String value, ValueCallback callback) { return new Execution(callback).perform(value); } EntityReferenceTranslator(Project project, String targetType, SimpleCache cache); }
EntityReferenceTranslator implements Translator { @Override public String translate(String value, ValueCallback callback) { return new Execution(callback).perform(value); } EntityReferenceTranslator(Project project, String targetType, SimpleCache cache); @Override String translate(String value, ValueCallback callback); String getTargetType(); }
EntityReferenceTranslator implements Translator { @Override public String translate(String value, ValueCallback callback) { return new Execution(callback).perform(value); } EntityReferenceTranslator(Project project, String targetType, SimpleCache cache); @Override String translate(String value, ValueCallback callback); String getTargetType();  }