コード例 #1
0
ファイル: VerifierTest.java プロジェクト: GitHubTE/bnd
 public static void testInvalidCaseForHeader() throws Exception {
   Properties p = new Properties();
   p.put("Export-package", "org.apache.mina.*");
   p.put("Bundle-Classpath", ".");
   Analyzer analyzer = new Analyzer();
   analyzer.setProperties(p);
   analyzer.getProperties();
   System.err.println("Errors   " + analyzer.getErrors());
   System.err.println("Warnings " + analyzer.getWarnings());
   assertEquals(0, analyzer.getErrors().size());
   assertEquals(2, analyzer.getWarnings().size());
 }
コード例 #2
0
ファイル: IncludeHeaderTest.java プロジェクト: GitHubTE/bnd
 public static void testIncludeHeader() throws IOException {
   Analyzer analyzer = new Analyzer();
   analyzer.setBase(IO.getFile("src/test"));
   Properties p = new Properties();
   p.put("a", "1");
   p.put("-include", "includeheadertest.mf, includeheadertest.prop");
   analyzer.setProperties(p);
   System.err.println(analyzer.getProperties());
   assertEquals("1", analyzer.getProperty("a"));
   assertEquals("end", analyzer.getProperty("last-props"));
   assertEquals("end", analyzer.getProperty("last-manifest"));
   assertEquals("abcd", analyzer.getProperty("manifest"));
   assertEquals("abcd", analyzer.getProperty("props"));
   assertEquals("1", analyzer.getProperty("test"));
 }