Search in sources :

Example 1 with SamplingProcessor

use of org.apache.synapse.message.processor.impl.sampler.SamplingProcessor in project wso2-synapse by wso2.

the class MessageProcessorSerializerTest method testSerializeMessageProcessor2.

/**
 * test serializeMessageProcessor and assert the OMElement is created.
 */
@Test
public void testSerializeMessageProcessor2() {
    MessageProcessor messageProcessor = new SamplingProcessor();
    messageProcessor.setName("testStore");
    OMElement element = MessageProcessorSerializer.serializeMessageProcessor(null, messageProcessor);
    Assert.assertNotNull("OMElement is not returned", element);
}
Also used : MessageProcessor(org.apache.synapse.message.processor.MessageProcessor) SamplingProcessor(org.apache.synapse.message.processor.impl.sampler.SamplingProcessor) OMElement(org.apache.axiom.om.OMElement) Test(org.junit.Test)

Example 2 with SamplingProcessor

use of org.apache.synapse.message.processor.impl.sampler.SamplingProcessor in project wso2-synapse by wso2.

the class MessageProcessorSerializerTest method testSerializeMessageProcessor.

/**
 * test serializeMessageProcessor with no Message store name.
 */
@Test(expected = SynapseException.class)
public void testSerializeMessageProcessor() {
    MessageProcessor messageProcessor = new SamplingProcessor();
    MessageProcessorSerializer.serializeMessageProcessor(null, messageProcessor);
}
Also used : MessageProcessor(org.apache.synapse.message.processor.MessageProcessor) SamplingProcessor(org.apache.synapse.message.processor.impl.sampler.SamplingProcessor) Test(org.junit.Test)

Aggregations

MessageProcessor (org.apache.synapse.message.processor.MessageProcessor)2 SamplingProcessor (org.apache.synapse.message.processor.impl.sampler.SamplingProcessor)2 Test (org.junit.Test)2 OMElement (org.apache.axiom.om.OMElement)1