@Test public void testAbstractClass() throws Exception { CompilerAssert<?, ?> compiler = compiler("plugin", "binding", "provider", "abstractclass"); compiler.formalErrorReporting(true); List<CompilationError> errors = compiler.failCompile(); assertEquals(1, errors.size()); CompilationError error = errors.get(0); assertEquals(BindingMetaModelPlugin.IMPLEMENTATION_NOT_ABSTRACT, error.getCode()); assertEquals("/plugin/binding/provider/abstractclass/package-info.java", error.getSource()); }
@Test public void testNotAssignable() throws Exception { CompilerAssert<?, ?> compiler = compiler("plugin", "binding", "provider", "notassignable"); compiler.formalErrorReporting(true); List<CompilationError> errors = compiler.failCompile(); assertEquals(1, errors.size()); CompilationError error = errors.get(0); assertEquals(BindingMetaModelPlugin.PROVIDER_NOT_ASSIGNABLE, error.getCode()); assertEquals("/plugin/binding/provider/notassignable/package-info.java", error.getSource()); }