Package org.apache.servicemix.nmr.api

Examples of org.apache.servicemix.nmr.api.WireRegistry


        assertNotNull(servicemix.getWireRegistry());
    }
   
    public void testSetWireRegistry() {
        ServiceMix servicemix = new ServiceMix();
        WireRegistry registry = new WireRegistryImpl();
        servicemix.setWireRegistry(registry);
        servicemix.init();
        assertSame("Should use the registry that was set instead of creating a new now",
                   registry, servicemix.getWireRegistry());
    }
View Full Code Here


        Wire wire = new MockWire();
        Map<String, Object> properties = new HashMap<String, Object>();
        properties.put("wire-length", 12);
        properties.put("wire-type", "coton");
       
        WireRegistry registry = new WireRegistryImpl();
        registry.register(wire, properties);
        assertEquals(1, registry.getServices().size());
        assertEquals(properties, registry.getProperties(wire));
       
        assertSame(wire, registry.getWire(properties));
       
        registry.unregister(wire, properties);
        assertEquals(0, registry.getServices().size());
        assertEquals(null, registry.getProperties(wire));
    }
View Full Code Here

        Map<String, Object> from = new HashMap<String, Object>();
        from.put("wire-length", 12);
        from.put("wire-type", "coton");
        Wire wire = ServiceHelper.createWire(from, ServiceHelper.createMap("wire-usage", "knitting"));
       
        WireRegistry registry = new WireRegistryImpl();
        registry.register(wire);
        assertEquals(1, registry.getServices().size());
        assertEquals(from, registry.getProperties(wire));
       
        assertSame(wire, registry.getWire(from));
       
        registry.unregister(wire);
        assertEquals(0, registry.getServices().size());
        assertEquals(null, registry.getProperties(wire));
    }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.nmr.api.WireRegistry

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.