Search in sources :

Example 16 with SynapseImport

use of org.apache.synapse.libraries.imports.SynapseImport in project wso2-synapse by wso2.

the class SynapseImportSerializerTest method testSerializeImportNoLibName.

/**
 * Test serializeImport with incomplete synapseImport.
 */
@Test
public void testSerializeImportNoLibName() {
    SynapseImport synapseImport = new SynapseImport();
    thrown.expect(SynapseException.class);
    thrown.expectMessage("Invalid Synapse Import. Target Library name is required");
    SynapseImportSerializer.serializeImport(synapseImport);
}
Also used : SynapseImport(org.apache.synapse.libraries.imports.SynapseImport) Test(org.junit.Test)

Aggregations

SynapseImport (org.apache.synapse.libraries.imports.SynapseImport)16 OMElement (org.apache.axiom.om.OMElement)6 Library (org.apache.synapse.libraries.model.Library)5 Test (org.junit.Test)5 IOException (java.io.IOException)3 QName (javax.xml.namespace.QName)3 OMAttribute (org.apache.axiom.om.OMAttribute)3 DeploymentException (org.apache.axis2.deployment.DeploymentException)3 SynapseException (org.apache.synapse.SynapseException)3 File (java.io.File)2 XMLStreamException (javax.xml.stream.XMLStreamException)2 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 Map (java.util.Map)1 Properties (java.util.Properties)1 OMFactory (org.apache.axiom.om.OMFactory)1 Startup (org.apache.synapse.Startup)1 PriorityExecutor (org.apache.synapse.commons.executors.PriorityExecutor)1 Entry (org.apache.synapse.config.Entry)1