@Test
 public void testNegativeCase() throws Exception {
   compilationHelper.assertCompileSucceeds(
       new File(
           this.getClass()
               .getResource("InjectMoreThanOneScopeAnnotationOnClassNegativeCases.java")
               .toURI()));
 }
コード例 #2
0
 /**
  * Assert that the compile succeeds, and that for each line of the test file that contains the
  * pattern //BUG("foo"), the diagnostic at that line contains "foo".
  */
 public void assertCompileSucceedsWithMessages(File source) throws IOException {
   assertCompileSucceeds(source);
   assertHasDiagnosticOnAllMatchingLines(diagnosticHelper.getDiagnostics(), source);
 }