@Test public void testAllResolvedManifests() throws Exception { Map<String, String> expected = new HashMap<>(); expected.put("admob", "Archive com.github.jomof:firebase/admob:2.1.3-rev8 is missing include"); expected.put("archiveMissingSha256", "Archive com.github.jomof:vectorial:0.0.0 is missing sha256"); expected.put("sqliteLinuxMultiple", "Package 'com.github.jomof:sqlite:0.0.0' has multiple linux archives. Only one is allowed."); expected.put("archiveMissingSize", "Archive com.github.jomof:vectorial:0.0.0 is missing size or it is zero"); expected.put("archiveMissingFile", "Archive com.github.jomof:vectorial:0.0.0 is missing file"); expected.put("templateWithNullArchives", "Package 'com.github.jomof:firebase/app:${version}' " + "has malformed version, expected major.minor.point[-tweak] but there were no dots"); expected.put("templateWithOnlyFile", "Package 'com.github.jomof:firebase/app:${version}' has " + "malformed version, expected major.minor.point[-tweak] but there were no dots"); expected.put("indistinguishableAndroidArchives", "Android archive com.github.jomof:firebase/app:0.0.0 file archive2.zip is indistinguishable at build time from archive1.zip given the information in the manifest"); expected.put("fuzz1", "Manifest was missing coordinate"); expected.put("fuzz2", "Manifest was missing coordinate"); boolean unexpectedFailure = false; for (ResolvedManifests.NamedManifest manifest : ResolvedManifests.all()) { String key = manifest.name; String expectedFailure = expected.get(key); try { CDepManifestYmlUtils.checkManifestSanity(manifest.resolved.cdepManifestYml); if (expectedFailure != null) { fail("Expected failure"); } } catch (RuntimeException e) { if (!e.getMessage().equals(expectedFailure)) { System.out.printf("expected.put(\"%s\", \"%s\");\n", key, e.getMessage()); unexpectedFailure = true; } } } if (unexpectedFailure) { throw new RuntimeException("Unexpected failures. See console."); } }
public static void checkManifestSanity(@NotNull CDepManifestYml cdepManifestYml) { new Checker().visit(cdepManifestYml, CDepManifestYml.class); }
CDepManifestYmlUtils { public static void checkManifestSanity(@NotNull CDepManifestYml cdepManifestYml) { new Checker().visit(cdepManifestYml, CDepManifestYml.class); } }
CDepManifestYmlUtils { public static void checkManifestSanity(@NotNull CDepManifestYml cdepManifestYml) { new Checker().visit(cdepManifestYml, CDepManifestYml.class); }  }
CDepManifestYmlUtils { public static void checkManifestSanity(@NotNull CDepManifestYml cdepManifestYml) { new Checker().visit(cdepManifestYml, CDepManifestYml.class); }  @NotNull static String convertManifestToString(@NotNull CDepManifestYml manifest); @NotNull static CDepManifestYml convertStringToManifest(@NotNull String content); static void checkManifestSanity(@NotNull CDepManifestYml cdepManifestYml); @NotNull static List<HardNameDependency> getTransitiveDependencies(@NotNull CDepManifestYml cdepManifestYml); }
CDepManifestYmlUtils { public static void checkManifestSanity(@NotNull CDepManifestYml cdepManifestYml) { new Checker().visit(cdepManifestYml, CDepManifestYml.class); }  @NotNull static String convertManifestToString(@NotNull CDepManifestYml manifest); @NotNull static CDepManifestYml convertStringToManifest(@NotNull String content); static void checkManifestSanity(@NotNull CDepManifestYml cdepManifestYml); @NotNull static List<HardNameDependency> getTransitiveDependencies(@NotNull CDepManifestYml cdepManifestYml);  }