/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.tuscany.sca.binding.jms.impl;
import java.io.InputStream;
import java.io.StringReader;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamReader;
import junit.framework.TestCase;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.ConfiguredOperation;
import org.apache.tuscany.sca.assembly.OperationsConfigurator;
import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.impl.DefaultMonitorFactoryImpl;
/**
* Tests for JMS binding xml
*/
public class JMSBindingProcessorTestCase extends TestCase {
// Note: If you are adding new JMS binding read test cases,
// consider adding a similar test case to JMSBindingProcessorWriteTestCase.
public static final String COMPOSITE =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String HEADERS1 =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String PROPERTIES1 =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " bla"
+ " 42"
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String OP_PROPERTIES1 =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " bla"
+ " 42"
+ " "
+ " "
+ " "
+ " "
+ " op2bla"
+ " 77"
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String OP_NAMES_NO_PROPERTIES1 =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String SELECTOR =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String COMPOSITE_INVALID_URI =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
// Invalid: contains both a response attribute and a response element.
public static final String COMPOSITE_INVALID_RESPONSE_ATTR_ELEMENT =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String DEST_PROPS =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " some value text"
+ " "
+ " "
+ " bla"
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String CF_PROPS =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " some value text"
+ " "
+ " "
+ " bla"
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String AS_PROPS =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " some value text"
+ " "
+ " "
+ " bla"
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String RESP_DEST_PROPS =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " some value text"
+ " "
+ " "
+ " bla"
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String RESP_CF_PROPS =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " some value text"
+ " "
+ " "
+ " bla"
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String RESP_AS_PROPS =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " some value text"
+ " "
+ " "
+ " bla"
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String OP_PROPS_PROPS =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " some value text"
+ " "
+ " "
+ " bla"
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String RES_ADPT_PROPS =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " some value text"
+ " "
+ " "
+ " bla"
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
public static final String CONFIGURED_OPERATIONS =
""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ "";
private XMLInputFactory inputFactory;
private StAXArtifactProcessor