Search in sources :

Example 11 with KModuleModel

use of org.kie.workbench.common.services.shared.kmodule.KModuleModel in project kie-wb-common by kiegroup.

the class KModuleContentHandlerTest method testBasic.

@Test
public void testBasic() throws Exception {
    KModuleContentHandler kModuleContentHandler = new KModuleContentHandler();
    KModuleModel model = kModuleContentHandler.toModel(readResource("simpleKModule.xml"));
    assertNotNull(model);
}
Also used : KModuleModel(org.kie.workbench.common.services.shared.kmodule.KModuleModel) Test(org.junit.Test)

Example 12 with KModuleModel

use of org.kie.workbench.common.services.shared.kmodule.KModuleModel in project kie-wb-common by kiegroup.

the class KModuleContentHandlerTest method testMarshallingOfDefaultDroolsNameSpace.

@Test
public void testMarshallingOfDefaultDroolsNameSpace() throws Exception {
    final KModuleContentHandler kModuleContentHandler = new KModuleContentHandler();
    final String kmodule = kModuleContentHandler.toString(new KModuleModel());
    assertNotNull(kmodule);
    assertTrue(kmodule.contains("xmlns=\"http://www.drools.org/xsd/kmodule\""));
}
Also used : KModuleModel(org.kie.workbench.common.services.shared.kmodule.KModuleModel) Test(org.junit.Test)

Aggregations

KModuleModel (org.kie.workbench.common.services.shared.kmodule.KModuleModel)12 Test (org.junit.Test)9 Metadata (org.guvnor.common.services.shared.metadata.model.Metadata)3 ProjectScreenModel (org.kie.workbench.common.screens.projecteditor.model.ProjectScreenModel)3 KBaseModel (org.kie.workbench.common.services.shared.kmodule.KBaseModel)3 List (java.util.List)2 HierarchicalStreamReader (com.thoughtworks.xstream.io.HierarchicalStreamReader)1 AbstractXStreamConverter (org.drools.core.util.AbstractXStreamConverter)1 GAV (org.guvnor.common.services.project.model.GAV)1 MavenRepository (org.guvnor.common.services.project.model.MavenRepository)1 POM (org.guvnor.common.services.project.model.POM)1 ProjectImports (org.guvnor.common.services.project.model.ProjectImports)1 Before (org.junit.Before)1 Import (org.kie.soup.project.datamodel.imports.Import)1 KieModule (org.kie.workbench.common.services.shared.project.KieModule)1 Path (org.uberfire.backend.vfs.Path)1 CallerMock (org.uberfire.mocks.CallerMock)1