Skip to content

Commit

Permalink
[BAPL-511] fix tests for local camel component
Browse files Browse the repository at this point in the history
  • Loading branch information
mariofusco committed Mar 28, 2018
1 parent bf9f850 commit 89e0b21
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,16 @@
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import javax.naming.NamingException;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;

import com.sun.tools.xjc.Language;
import com.sun.tools.xjc.Options;
import javax.naming.NamingException;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.model.dataformat.JaxbDataFormat;
import org.drools.core.command.impl.ExecutableCommand;
import org.drools.core.command.runtime.BatchExecutionCommandImpl;
import org.drools.core.command.runtime.process.StartProcessCommand;
import org.drools.core.command.runtime.rule.FireAllRulesCommand;
Expand All @@ -42,9 +39,7 @@
import org.drools.core.command.runtime.rule.ModifyCommand;
import org.drools.core.command.runtime.rule.QueryCommand;
import org.drools.core.common.DefaultFactHandle;
import org.drools.core.common.DisconnectedFactHandle;
import org.drools.core.runtime.rule.impl.FlatQueryResults;
import org.junit.Ignore;
import org.junit.Test;
import org.kie.api.KieServices;
import org.kie.api.builder.KieBuilder;
Expand All @@ -60,11 +55,9 @@
import org.kie.api.runtime.rule.FactHandle;
import org.kie.api.runtime.rule.QueryResultsRow;
import org.kie.camel.embedded.component.KiePolicy;
import org.kie.internal.runtime.helper.BatchExecutionHelper;
import org.kie.pipeline.camel.Person;
import org.kie.internal.builder.JaxbConfiguration;
import org.kie.internal.builder.KnowledgeBuilderFactory;
import org.kie.server.client.KieServicesFactory;
import org.kie.pipeline.camel.Person;

import static java.util.Collections.singletonList;

Expand Down Expand Up @@ -136,14 +129,6 @@ public void testSessionGetObject() throws Exception {

@Test
public void testSessionModify() throws Exception {
// String cmd = "";
// cmd += "<batch-execution lookup='ksession1'>\n";
// cmd += " <modify>\n";
// cmd += " <fact-handle external-form=\"" + handle + "\"></fact-handle>\n";
// cmd += " <setters accessor='name' value='salaboy' />\n";
// cmd += " </modify>\n";
// cmd += "</batch-execution>\n";

final DefaultFactHandle handleFact = DefaultFactHandle.createFromExternalFormat(this.handle);
final ModifyCommand.SetterImpl setterImpl = new ModifyCommand.SetterImpl("name", "salaboy");
final List<Setter> setters = new ArrayList<>();
Expand All @@ -162,12 +147,6 @@ public void testSessionModify() throws Exception {

assertXMLEqual(expectedXml, outXml);

// cmd = "<batch-execution lookup='ksession1'>\n";
// cmd += " <get-object out-identifier='rider'>\n";
// cmd += " <fact-handle>" + this.handle + "</fact-handle>\n";
// cmd += " </get-object>\n";
// cmd += "</batch-execution>\n";

final GetObjectCommand getObjectCommand = new GetObjectCommand(handleFact, "rider");
final BatchExecutionCommand getCommandBatch = new BatchExecutionCommandImpl(singletonList(getObjectCommand), "ksession1");
final String cmdGetObject = commandToString(getCommandBatch);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@
package org.kie.camel.embedded.camel.component.cxf;

import org.apache.camel.test.spring.CamelSpringTestSupport;
import org.junit.Ignore;
import org.junit.Test;
import org.kie.api.runtime.KieSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class CxfRestTestWithImport extends CamelSpringTestSupport {
public class CxfRestWithImportTest extends CamelSpringTestSupport {

private static final Logger logger = LoggerFactory.getLogger(CxfRestTestWithImport.class);
private static final Logger logger = LoggerFactory.getLogger(CxfRestWithImportTest.class);

@Override
protected AbstractXmlApplicationContext createApplicationContext() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@
package org.kie.camel.embedded.camel.component.cxf;

import org.apache.camel.test.spring.CamelSpringTestSupport;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class CxfRestTestWithLookup extends CamelSpringTestSupport {
public class CxfRestWithLookupTest extends CamelSpringTestSupport {

private static final Logger logger = LoggerFactory.getLogger(CxfRestTestWithLookup.class);
private static final Logger logger = LoggerFactory.getLogger(CxfRestWithLookupTest.class);

@Override
protected AbstractXmlApplicationContext createApplicationContext() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.springframework.context.support.ClassPathXmlApplicationContext;

@Ignore
public class CxfSoapTestWithLookup extends CamelSpringTestSupport {
public class CxfSoapWithLookupTest extends CamelSpringTestSupport {

@Override
protected AbstractXmlApplicationContext createApplicationContext() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<!-- Imports the KieBase and KieSessions from the classpath dependencies -->
<kie:import releaseId-ref="rId" />
<kie:releaseId groupId="org.drools" artifactId="named-kiesession" version="7.7.0-SNAPSHOT" id="rId" />
<kie:releaseId groupId="org.drools" artifactId="named-kiesession" version="7.5.0.Final" id="rId" />

<!-- Defined the server endpoint to create the cxf-rs consumer -->
<cxf:rsServer id="rsServer"
Expand Down

0 comments on commit 89e0b21

Please sign in to comment.