コード例 #1
0
 @Test
 public void loggingTests_withImplicitPluginDependency() throws Exception {
   DependencyList depList =
       new DependencyList("test", new HashSet<String>(), mockAggregator, features, true, true);
   depList.processDep("foo/plugin!foo/bar", explicitDeps, null, new HashSet<String>(), null);
   assertEquals(2, explicitDeps.size());
   assertEquals(Messages.DependencyList_1, explicitDeps.get("foo/plugin").getComment());
   assertEquals(
       MessageFormat.format(Messages.DependencyList_5, "test"),
       explicitDeps.get("foo/plugin!foo/bar").getComment());
 }
コード例 #2
0
 @Test
 public void loggingTests_withHasBranching() throws Exception {
   DependencyList depList =
       new DependencyList("test", new HashSet<String>(), mockAggregator, features, true, true);
   depList.processDep(
       "dojo/has!test?foo/test:bar/test", explicitDeps, null, new HashSet<String>(), null);
   assertEquals(3, explicitDeps.size());
   assertEquals(Messages.DependencyList_1, explicitDeps.get("dojo/has").getComment());
   String msg =
       MessageFormat.format(
           Messages.DependencyList_2, new Object[] {"dojo/has!test?foo/test:bar/test"});
   assertEquals(msg, explicitDeps.get("foo/test").getComment());
   assertEquals(msg, explicitDeps.get("bar/test").getComment());
 }
コード例 #3
0
 @Test
 public void loggingTests_simple() throws Exception {
   DependencyList depList =
       new DependencyList("test", new HashSet<String>(), mockAggregator, features, true, true);
   depList.processDep("foo/test", explicitDeps, null, new HashSet<String>(), null);
   assertEquals(1, explicitDeps.size());
   assertEquals(
       new HashSet<String>(Arrays.asList(new String[] {"foo/test"})), explicitDeps.getModuleIds());
   assertEquals(
       MessageFormat.format(Messages.DependencyList_5, "test"),
       explicitDeps.get("foo/test").getComment().trim());
 }
コード例 #4
0
 @Test
 public void loggingTests_withAliasing() throws Exception {
   DependencyList depList =
       new DependencyList("test", new HashSet<String>(), mockAggregator, features, true, true);
   configRef.set(new ConfigImpl(mockAggregator, tmpDir, "{aliases:[['foo/test', 'foo/bar']]}"));
   depList.processDep("foo/test", explicitDeps, null, new HashSet<String>(), null);
   assertEquals(1, explicitDeps.size());
   assertEquals(
       new HashSet<String>(Arrays.asList(new String[] {"foo/bar"})), explicitDeps.getModuleIds());
   assertEquals(
       MessageFormat.format(Messages.DependencyList_5, "test")
           + ", Aliased from: foo/test --> foo/bar",
       explicitDeps.get("foo/bar").getComment());
 }