@Test public void gitHubToProxiedSpecVersionIncludeNonPrintableCharactersTest() throws Exception { String spec = "{\n" + " \"name\": \"Realm\",\n" + " \"version\": \"0.92.3\\n\",\n" + " \"source\": {\n" + " \"git\": \"https: " \"tag\": \"v0.92.3\"\n" + " }\n" + "}"; URI repoUri = URI.create("http: String res = new SpecFileProcessor(gitApiHelper).toProxiedSpec(spec, repoUri); assertThat(res.contains("/Realm/0.92.3/"), is(true)); }
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);  }