Search in sources :

Example 31 with AFCompiler

use of org.kie.workbench.common.services.backend.compiler.AFCompiler in project kie-wb-common by kiegroup.

the class KieMavenCompilerFactoryTest method jgitBeforeAndKieAfterDecoratorTest.

@Test
public void jgitBeforeAndKieAfterDecoratorTest() {
    final AFCompiler jgitBeforeAndLogAfter = KieMavenCompilerFactory.getCompiler(EnumSet.of(KieDecorator.UPDATE_JGIT_BEFORE_BUILD, KieDecorator.STORE_KIE_OBJECTS));
    assertThat(jgitBeforeAndLogAfter).isInstanceOf(JGITCompilerBeforeDecorator.class);
    AFCompiler kieAfterDecorator = ((JGITCompilerBeforeDecorator) jgitBeforeAndLogAfter).getCompiler();
    assertThat(kieAfterDecorator).isInstanceOf(KieAfterDecorator.class);
    AFCompiler baseMavenCompiler = ((KieAfterDecorator) kieAfterDecorator).getCompiler();
    assertThat(baseMavenCompiler).isInstanceOf(BaseMavenCompiler.class);
}
Also used : KieAfterDecorator(org.kie.workbench.common.services.backend.compiler.impl.decorators.KieAfterDecorator) JGITCompilerBeforeDecorator(org.kie.workbench.common.services.backend.compiler.impl.decorators.JGITCompilerBeforeDecorator) AFCompiler(org.kie.workbench.common.services.backend.compiler.AFCompiler) Test(org.junit.Test)

Example 32 with AFCompiler

use of org.kie.workbench.common.services.backend.compiler.AFCompiler in project kie-wb-common by kiegroup.

the class KieMavenCompilerFactoryTest method kieLogAndClasspathDepsAfterTest.

@Test
public void kieLogAndClasspathDepsAfterTest() {
    final AFCompiler kieAfterDecorator = KieMavenCompilerFactory.getCompiler(EnumSet.of(KieDecorator.STORE_KIE_OBJECTS, KieDecorator.ENABLE_LOGGING, KieDecorator.STORE_BUILD_CLASSPATH));
    assertThat(kieAfterDecorator).isInstanceOf(KieAfterDecorator.class);
    AFCompiler outputLofAfterDecorator = ((KieAfterDecorator) kieAfterDecorator).getCompiler();
    assertThat(outputLofAfterDecorator).isInstanceOf(OutputLogAfterDecorator.class);
    AFCompiler classpathAfter = ((OutputLogAfterDecorator) outputLofAfterDecorator).getCompiler();
    assertThat(classpathAfter).isInstanceOf(ClasspathDepsAfterDecorator.class);
    AFCompiler baseMavenCompiler = ((ClasspathDepsAfterDecorator) classpathAfter).getCompiler();
    assertThat(baseMavenCompiler).isInstanceOf(BaseMavenCompiler.class);
}
Also used : KieAfterDecorator(org.kie.workbench.common.services.backend.compiler.impl.decorators.KieAfterDecorator) ClasspathDepsAfterDecorator(org.kie.workbench.common.services.backend.compiler.impl.decorators.ClasspathDepsAfterDecorator) OutputLogAfterDecorator(org.kie.workbench.common.services.backend.compiler.impl.decorators.OutputLogAfterDecorator) AFCompiler(org.kie.workbench.common.services.backend.compiler.AFCompiler) Test(org.junit.Test)

Example 33 with AFCompiler

use of org.kie.workbench.common.services.backend.compiler.AFCompiler in project kie-wb-common by kiegroup.

the class KieMavenCompilerFactoryTest method kieAndLogAfterDecoratorTest.

@Test
public void kieAndLogAfterDecoratorTest() {
    final AFCompiler kieAfterDecorator = KieMavenCompilerFactory.getCompiler(EnumSet.of(KieDecorator.STORE_KIE_OBJECTS, KieDecorator.ENABLE_LOGGING));
    assertThat(kieAfterDecorator).isInstanceOf(KieAfterDecorator.class);
    AFCompiler outputLofAfterDecorator = ((KieAfterDecorator) kieAfterDecorator).getCompiler();
    assertThat(outputLofAfterDecorator).isInstanceOf(OutputLogAfterDecorator.class);
    AFCompiler baseMavenCompiler = ((OutputLogAfterDecorator) outputLofAfterDecorator).getCompiler();
    assertThat(baseMavenCompiler).isInstanceOf(BaseMavenCompiler.class);
}
Also used : KieAfterDecorator(org.kie.workbench.common.services.backend.compiler.impl.decorators.KieAfterDecorator) OutputLogAfterDecorator(org.kie.workbench.common.services.backend.compiler.impl.decorators.OutputLogAfterDecorator) AFCompiler(org.kie.workbench.common.services.backend.compiler.AFCompiler) Test(org.junit.Test)

Example 34 with AFCompiler

use of org.kie.workbench.common.services.backend.compiler.AFCompiler in project kie-wb-common by kiegroup.

the class KieMavenCompilerFactoryTest method kieAfterDecoratorTest.

@Test
public void kieAfterDecoratorTest() {
    final AFCompiler kieAfter = KieMavenCompilerFactory.getCompiler(EnumSet.of(KieDecorator.STORE_KIE_OBJECTS));
    assertThat(kieAfter).isInstanceOf(KieAfterDecorator.class);
}
Also used : AFCompiler(org.kie.workbench.common.services.backend.compiler.AFCompiler) Test(org.junit.Test)

Example 35 with AFCompiler

use of org.kie.workbench.common.services.backend.compiler.AFCompiler in project kie-wb-common by kiegroup.

the class KieMavenCompilerFactoryTest method jgitBeforeAndLogAfterDecoratorTest.

@Test
public void jgitBeforeAndLogAfterDecoratorTest() {
    final AFCompiler jgitBeforeAndLogAfter = KieMavenCompilerFactory.getCompiler(EnumSet.of(KieDecorator.UPDATE_JGIT_BEFORE_BUILD, KieDecorator.ENABLE_LOGGING));
    assertThat(jgitBeforeAndLogAfter).isInstanceOf(JGITCompilerBeforeDecorator.class);
    AFCompiler outputLofAfterDecorator = ((JGITCompilerBeforeDecorator) jgitBeforeAndLogAfter).getCompiler();
    assertThat(outputLofAfterDecorator).isInstanceOf(OutputLogAfterDecorator.class);
    AFCompiler baseMavenCompiler = ((OutputLogAfterDecorator) outputLofAfterDecorator).getCompiler();
    assertThat(baseMavenCompiler).isInstanceOf(BaseMavenCompiler.class);
}
Also used : JGITCompilerBeforeDecorator(org.kie.workbench.common.services.backend.compiler.impl.decorators.JGITCompilerBeforeDecorator) OutputLogAfterDecorator(org.kie.workbench.common.services.backend.compiler.impl.decorators.OutputLogAfterDecorator) AFCompiler(org.kie.workbench.common.services.backend.compiler.AFCompiler) Test(org.junit.Test)

Aggregations

AFCompiler (org.kie.workbench.common.services.backend.compiler.AFCompiler)39 Test (org.junit.Test)27 WorkspaceCompilationInfo (org.kie.workbench.common.services.backend.compiler.impl.WorkspaceCompilationInfo)26 CompilationRequest (org.kie.workbench.common.services.backend.compiler.CompilationRequest)24 DefaultCompilationRequest (org.kie.workbench.common.services.backend.compiler.impl.DefaultCompilationRequest)24 Path (org.uberfire.java.nio.file.Path)14 CompilationResponse (org.kie.workbench.common.services.backend.compiler.CompilationResponse)13 KieAfterDecorator (org.kie.workbench.common.services.backend.compiler.impl.decorators.KieAfterDecorator)8 OutputLogAfterDecorator (org.kie.workbench.common.services.backend.compiler.impl.decorators.OutputLogAfterDecorator)7 KieCompilationResponse (org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse)7 File (java.io.File)6 HashMap (java.util.HashMap)6 Ignore (org.junit.Ignore)5 ClasspathDepsAfterDecorator (org.kie.workbench.common.services.backend.compiler.impl.decorators.ClasspathDepsAfterDecorator)5 JGITCompilerBeforeDecorator (org.kie.workbench.common.services.backend.compiler.impl.decorators.JGITCompilerBeforeDecorator)5 JGitFileSystem (org.uberfire.java.nio.fs.jgit.JGitFileSystem)5 URI (java.net.URI)4 InternalKieModule (org.drools.compiler.kie.builder.impl.InternalKieModule)3 KieModuleMetaInfo (org.drools.core.rule.KieModuleMetaInfo)3 Git (org.eclipse.jgit.api.Git)3