Esempio n. 1
0
 @Test
 public void testBuildInAlias() throws PluginException {
   Set<LicenseDependency> dependencies =
       Sets.newLinkedHashSet(
           LicenseDependency.of("Lib 1", LicenseInfo.withName("Apache License Version 2.0")));
   SaguaroConfig config = SaguaroConfig.of().build();
   LicenseDependency result = resolve(dependencies, config).iterator().next();
   assertThat(result.getLicenses()).contains(LicenseInfo.withKey("apache2"));
 }
Esempio n. 2
0
 @Test
 public void testSingleAlias() throws PluginException {
   Set<LicenseDependency> dependencies =
       Sets.newLinkedHashSet(
           LicenseDependency.of("Lib 1", LicenseInfo.withName("Test License Alias")));
   SaguaroConfig config =
       SaguaroConfig.of()
           .aliases(new Alias(LicenseInfo.withName("Test License"), "Test License Alias"))
           .build();
   LicenseDependency result = resolve(dependencies, config).iterator().next();
   assertThat(result.getLicenses()).contains(LicenseInfo.withName("Test License"));
 }