Package org.apache.tuscany.sca.implementation.notification

Examples of org.apache.tuscany.sca.implementation.notification.NotificationImplementationProcessor


*/
public class NotificationImplementationLoaderTestCase extends TestCase {

    public void testRead() throws Exception {
        try {
        NotificationImplementationProcessor implementationLoader =
            new NotificationImplementationProcessor(new DefaultNotificationImplementationFactory());

        XMLStreamReader reader = EasyMock.createMock(XMLStreamReader.class);
        EasyMock.expect(reader.getName()).andReturn(NotificationImplementationProcessor.IMPLEMENTATION_NOTIFICATION).times(2);
        EasyMock.expect(reader.getAttributeValue(null, "name")).andReturn("TrafficAdvisoryNotificationTestCase");
        EasyMock.expect(reader.getAttributeValue(null, "type")).andReturn(null);
        EasyMock.expect(reader.hasNext()).andReturn(true);
        EasyMock.expect(reader.next()).andReturn(XMLStreamConstants.END_ELEMENT);
        EasyMock.replay(reader);
       
        Implementation impl = implementationLoader.read(reader);
        Assert.assertNotNull(impl);
        } catch(Throwable e) {
            e.printStackTrace();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.implementation.notification.NotificationImplementationProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.