@Test public void gitHubToProxiedSpecPositiveTest() throws Exception { String spec = "{" + "\"name\": \"MasonryHidden\"," + "\"version\": \"1.0.0\"," + "\"source\": {\n" + "\"git\": \"https: "\"tag\": \"0.5.0\"" + "}" + "}"; String transformedSpec = "{\n" + " \"name\" : \"MasonryHidden\",\n" + " \"version\" : \"1.0.0\",\n" + " \"source\" : {\n" + " \"http\" : \"http: " }\n" + "}"; URI repoUri = URI.create("http: String res = new SpecFileProcessor(gitApiHelper).toProxiedSpec(spec, repoUri); assertThat(res, is(transformedSpec)); }
public String toProxiedSpec(final String specFile, final URI repoUri) throws InvalidSpecFileException { try { return transformSpec(specFile, repoUri); } catch (IOException ioe) { throw new InvalidSpecFileException(specFile, ioe); } }
SpecFileProcessor { public String toProxiedSpec(final String specFile, final URI repoUri) throws InvalidSpecFileException { try { return transformSpec(specFile, repoUri); } catch (IOException ioe) { throw new InvalidSpecFileException(specFile, ioe); } } }
SpecFileProcessor { public String toProxiedSpec(final String specFile, final URI repoUri) throws InvalidSpecFileException { try { return transformSpec(specFile, repoUri); } catch (IOException ioe) { throw new InvalidSpecFileException(specFile, ioe); } } @Inject  SpecFileProcessor(final GitApiHelper gitApiHelper); }
SpecFileProcessor { public String toProxiedSpec(final String specFile, final URI repoUri) throws InvalidSpecFileException { try { return transformSpec(specFile, repoUri); } catch (IOException ioe) { throw new InvalidSpecFileException(specFile, ioe); } } @Inject  SpecFileProcessor(final GitApiHelper gitApiHelper); String toProxiedSpec(final String specFile, final URI repoUri); URI extractExternalUri(final String specFile); }
SpecFileProcessor { public String toProxiedSpec(final String specFile, final URI repoUri) throws InvalidSpecFileException { try { return transformSpec(specFile, repoUri); } catch (IOException ioe) { throw new InvalidSpecFileException(specFile, ioe); } } @Inject  SpecFileProcessor(final GitApiHelper gitApiHelper); String toProxiedSpec(final String specFile, final URI repoUri); URI extractExternalUri(final String specFile);  }