@Test public void shouldCreateUri() { final NobtLinkFactory nobtLinkFactory = new NobtLinkFactory(new BasePath("http", "localhost:1234")); final Nobt nobt = aNobt().withId(new NobtId("foo")).build(); final URI linkToNobt = nobtLinkFactory.createLinkTo(nobt); Assert.assertEquals("http: }
@Override public URI createLinkTo(Nobt nobt) { return URI.create(String.format("%s/nobts/%s", basePath.asString(), nobt.getId().getValue())); }
NobtLinkFactory implements LinkFactory<Nobt> { @Override public URI createLinkTo(Nobt nobt) { return URI.create(String.format("%s/nobts/%s", basePath.asString(), nobt.getId().getValue())); } }
NobtLinkFactory implements LinkFactory<Nobt> { @Override public URI createLinkTo(Nobt nobt) { return URI.create(String.format("%s/nobts/%s", basePath.asString(), nobt.getId().getValue())); } NobtLinkFactory(BasePath basePath); }
NobtLinkFactory implements LinkFactory<Nobt> { @Override public URI createLinkTo(Nobt nobt) { return URI.create(String.format("%s/nobts/%s", basePath.asString(), nobt.getId().getValue())); } NobtLinkFactory(BasePath basePath); @Override URI createLinkTo(Nobt nobt); }
NobtLinkFactory implements LinkFactory<Nobt> { @Override public URI createLinkTo(Nobt nobt) { return URI.create(String.format("%s/nobts/%s", basePath.asString(), nobt.getId().getValue())); } NobtLinkFactory(BasePath basePath); @Override URI createLinkTo(Nobt nobt);  }