@Test public void testAbstractClass() throws Exception { CompilerAssert<File, File> compiler = compiler("plugin.binding.implementation.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()); File f = compiler.getSourcePath().getPath("plugin", "binding", "implementation", "abstractclass", "package-info.java"); assertEquals(f, error.getSourceFile()); }
@Test public void testNotAssignable() throws Exception { CompilerAssert<File, File> 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()); File f = compiler.getSourcePath().getPath("plugin", "binding", "provider", "notassignable", "package-info.java"); assertEquals(f, error.getSourceFile()); }
@Test public void testAbstractClass() throws Exception { CompilerAssert<File, File> 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()); File f = compiler.getSourcePath().getPath("plugin", "binding", "provider", "abstractclass", "package-info.java"); assertEquals(f, error.getSourceFile()); }
@Test public void testNotAssignable() throws Exception { CompilerAssert<File, File> compiler = compiler("plugin.binding.implementation.notassignable"); compiler.formalErrorReporting(true); List<CompilationError> errors = compiler.failCompile(); assertEquals(1, errors.size()); CompilationError error = errors.get(0); assertEquals(BindingMetaModelPlugin.IMPLEMENTATION_NOT_ASSIGNABLE, error.getCode()); File f = compiler.getSourcePath().getPath("plugin", "binding", "implementation", "notassignable", "package-info.java"); assertEquals(f, error.getSourceFile()); }
@Test public void testMalformedPath() throws Exception { CompilerAssert<File, File> ca = compiler("plugin.less.malformedpath"); List<CompilationError> errors = ca.formalErrorReporting(true).failCompile(); assertEquals(1, errors.size()); assertEquals(LessMetaModelPlugin.MALFORMED_PATH, errors.get(0).getCode()); File f = ca.getSourcePath().getPath("plugin", "less", "malformedpath", "package-info.java"); assertEquals(f, errors.get(0).getSourceFile()); f = ca.getClassOutput().getPath("plugin", "less", "malformedpath", "assets", "stylesheet.css"); assertNull(f); }
@Test public void testNoZeroCtor() throws Exception { CompilerAssert<File, File> compiler = compiler("plugin.binding.provider.factory.nozeroargctor"); compiler.formalErrorReporting(true); List<CompilationError> errors = compiler.failCompile(); assertEquals(1, errors.size()); CompilationError error = errors.get(0); assertEquals(BindingMetaModelPlugin.PROVIDER_FACTORY_NO_ZERO_ARG_CTOR, error.getCode()); File f = compiler.getSourcePath().getPath("plugin", "binding", "provider", "factory", "nozeroargctor", "package-info.java"); assertEquals(f, error.getSourceFile()); }
@Test public void testAbstractClass() throws Exception { CompilerAssert<File, File> compiler = compiler("plugin.binding.provider.factory.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()); File f = compiler.getSourcePath().getPath("plugin", "binding", "provider", "factory", "abstractclass", "package-info.java"); assertEquals(f, error.getSourceFile()); }
@Test public void testNoPublicCtor() throws Exception { CompilerAssert<File, File> compiler = compiler("plugin.binding.provider.factory.nopublicctor"); compiler.formalErrorReporting(true); List<CompilationError> errors = compiler.failCompile(); assertEquals(1, errors.size()); CompilationError error = errors.get(0); assertEquals(BindingMetaModelPlugin.PROVIDER_FACTORY_NO_PUBLIC_CTOR, error.getCode()); File f = compiler.getSourcePath().getPath("plugin", "binding", "provider", "factory", "nopublicctor", "package-info.java"); assertEquals(f, error.getSourceFile()); }
@Test public void testNotPublicClass() throws Exception { CompilerAssert<File, File> compiler = compiler("plugin.binding.provider.factory.notpublicclass"); compiler.formalErrorReporting(true); List<CompilationError> errors = compiler.failCompile(); assertEquals(1, errors.size()); CompilationError error = errors.get(0); assertEquals(BindingMetaModelPlugin.PROVIDER_FACTORY_NOT_PUBLIC, error.getCode()); File f = compiler.getSourcePath().getPath("plugin", "binding", "provider", "factory", "notpublicclass", "package-info.java"); assertEquals(f, error.getSourceFile()); }
@Test public void testAbstractClass() throws Exception { CompilerAssert<File, File> compiler = compiler("plugin.binding.provider.factory.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()); File f = compiler.getSourcePath().getPath("plugin", "binding", "provider", "factory", "abstractclass", "package-info.java"); assertEquals(f, error.getSourceFile()); }
@Test public void testAbstractClass() throws Exception { CompilerAssert<File, File> 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()); File f = compiler.getSourcePath().getPath("plugin", "binding", "provider", "abstractclass", "package-info.java"); assertEquals(f, error.getSourceFile()); }
@Test public void testNotAssignable() throws Exception { CompilerAssert<File, File> compiler = compiler("plugin.binding.implementation.notassignable"); compiler.formalErrorReporting(true); List<CompilationError> errors = compiler.failCompile(); assertEquals(1, errors.size()); CompilationError error = errors.get(0); assertEquals(BindingMetaModelPlugin.IMPLEMENTATION_NOT_ASSIGNABLE, error.getCode()); File f = compiler.getSourcePath().getPath("plugin", "binding", "implementation", "notassignable", "package-info.java"); assertEquals(f, error.getSourceFile()); }
@Test public void testAbstractClass() throws Exception { CompilerAssert<File, File> compiler = compiler("plugin.binding.implementation.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()); File f = compiler.getSourcePath().getPath("plugin", "binding", "implementation", "abstractclass", "package-info.java"); assertEquals(f, error.getSourceFile()); }
@Test public void testMalformedPath() throws Exception { CompilerAssert<File, File> ca = compiler("plugin.less.malformedpath"); List<CompilationError> errors = ca.formalErrorReporting(true).failCompile(); assertEquals(1, errors.size()); assertEquals(LessMetaModelPlugin.MALFORMED_PATH, errors.get(0).getCode()); File f = ca.getSourcePath().getPath("plugin", "less", "malformedpath", "package-info.java"); assertEquals(f, errors.get(0).getSourceFile()); f = ca.getClassOutput().getPath("plugin", "less", "malformedpath", "assets", "stylesheet.css"); assertNull(f); }
@Test public void testFail() throws Exception { CompilerAssert<File, File> ca = compiler("plugin.less.fail"); List<CompilationError> errors = ca.formalErrorReporting(true).failCompile(); assertEquals(1, errors.size()); assertEquals(LessMetaModelPlugin.COMPILATION_ERROR, errors.get(0).getCode()); File f = ca.getSourcePath().getPath("plugin", "less", "fail", "package-info.java"); assertEquals(f, errors.get(0).getSourceFile()); f = ca.getClassOutput().getPath("plugin", "less", "fail", "assets", "stylesheet.css"); assertNull(f); }
@Test public void testNotFound() throws Exception { CompilerAssert<File, File> ca = compiler("plugin.less.notfound"); List<CompilationError> errors = ca.formalErrorReporting(true).failCompile(); assertEquals(1, errors.size()); assertEquals(LessMetaModelPlugin.COMPILATION_ERROR, errors.get(0).getCode()); File f = ca.getSourcePath().getPath("plugin", "less", "notfound", "package-info.java"); assertEquals(f, errors.get(0).getSourceFile()); f = ca.getClassOutput().getPath("plugin", "less", "notfound", "assets", "stylesheet.css"); assertNull(f); }
@Test public void testCannotResolve() throws Exception { CompilerAssert<File, File> ca = compiler("plugin.less.cannotresolve"); List<CompilationError> errors = ca.formalErrorReporting(true).failCompile(); assertEquals(1, errors.size()); assertEquals(LessMetaModelPlugin.COMPILATION_ERROR, errors.get(0).getCode()); File f = ca.getSourcePath().getPath("plugin", "less", "cannotresolve", "package-info.java"); assertEquals(f, errors.get(0).getSourceFile()); f = ca.getClassOutput().getPath("plugin", "less", "cannotresolve", "assets", "stylesheet.css"); assertNull(f); }
@Test public void testFail() throws Exception { CompilerAssert<File, File> ca = compiler("plugin.less.fail"); List<CompilationError> errors = ca.formalErrorReporting(true).failCompile(); assertEquals(1, errors.size()); assertEquals(LessMetaModelPlugin.COMPILATION_ERROR, errors.get(0).getCode()); File f = ca.getSourcePath().getPath("plugin", "less", "fail", "package-info.java"); assertEquals(f, errors.get(0).getSourceFile()); f = ca.getClassOutput().getPath("plugin", "less", "fail", "assets", "stylesheet.css"); assertNull(f); }
@Test public void testNotFound() throws Exception { CompilerAssert<File, File> ca = compiler("plugin.less.notfound"); List<CompilationError> errors = ca.formalErrorReporting(true).failCompile(); assertEquals(1, errors.size()); assertEquals(LessMetaModelPlugin.COMPILATION_ERROR, errors.get(0).getCode()); File f = ca.getSourcePath().getPath("plugin", "less", "notfound", "package-info.java"); assertEquals(f, errors.get(0).getSourceFile()); f = ca.getClassOutput().getPath("plugin", "less", "notfound", "assets", "stylesheet.css"); assertNull(f); }
@Test public void testCannotResolve() throws Exception { CompilerAssert<File, File> ca = compiler("plugin.less.cannotresolve"); List<CompilationError> errors = ca.formalErrorReporting(true).failCompile(); assertEquals(1, errors.size()); assertEquals(LessMetaModelPlugin.COMPILATION_ERROR, errors.get(0).getCode()); File f = ca.getSourcePath().getPath("plugin", "less", "cannotresolve", "package-info.java"); assertEquals(f, errors.get(0).getSourceFile()); f = ca.getClassOutput().getPath("plugin", "less", "cannotresolve", "assets", "stylesheet.css"); assertNull(f); }