Package org.easymock

Examples of org.easymock.IMocksControl.replay()


        ServiceReference sref = c.createMock(ServiceReference.class);
        EasyMock.expect(sref.getBundle()).andReturn(b).anyTimes();

        RemoteServiceAdminCore rsaCore = new RemoteServiceAdminCore(bc);

        c.replay();

        // must return an empty List as sref if from the same bundle
        List exRefs = rsaCore.exportService(sref, null);

        assertNotNull(exRefs);
View Full Code Here


            "es.schaaf.my.class"
        });
        p.put(RemoteConstants.SERVICE_IMPORTED_CONFIGS, "unsupportetConfiguration");
        EndpointDescription endpoint = new EndpointDescription(p);

        c.replay();

        // must be null as the endpoint doesn't contain any usable configurations
        assertNull(rsaCore.importService(endpoint));
        // must be empty ...
        assertEquals(0, rsaCore.getImportedEndpoints().size());
View Full Code Here

        IMocksControl c = EasyMock.createNiceControl();
        Bundle b = c.createMock(Bundle.class);
        BundleContext bc = c.createMock(BundleContext.class);

        c.replay();

        RemoteServiceAdminCore rsaCore = new RemoteServiceAdminCore(bc);

        Properties serviceProperties = new Properties();
View Full Code Here

        IMocksControl c = EasyMock.createNiceControl();
        Bundle b = c.createMock(Bundle.class);
        BundleContext bc = c.createMock(BundleContext.class);

        c.replay();

        RemoteServiceAdminCore rsaCore = new RemoteServiceAdminCore(bc);

        Properties serviceProperties = new Properties();
View Full Code Here

    @Test
    public void testException(){
       
        IMocksControl c = EasyMock.createNiceControl();
        Exception e = c.createMock(Exception.class);
        c.replay();
       
        ImportRegistrationImpl i = new ImportRegistrationImpl(e);
       
        assertEquals(e, i.getException());
        assertNull(i.getImportedEndpointDescription());
View Full Code Here

        IMocksControl c = EasyMock.createNiceControl();
        EndpointDescription ed = c.createMock(EndpointDescription.class);
        RemoteServiceAdminCore rsac = c.createMock(RemoteServiceAdminCore.class);
       
       
        c.replay();
       
        ImportRegistrationImpl i = new ImportRegistrationImpl(ed,rsac);
       
        assertNull(i.getException());
        assertEquals(i, i.getParent());
View Full Code Here

       
        ServiceRegistration sr = c.createMock(ServiceRegistration.class);
        ServiceReference sref = c.createMock(ServiceReference.class);
        EasyMock.expect(sr.getReference()).andReturn(sref).anyTimes();
       
        c.replay();
       
        ImportRegistrationImpl i1 = new ImportRegistrationImpl(ed,rsac);
       
        ImportRegistrationImpl i2 = new ImportRegistrationImpl(i1);
       
View Full Code Here

        c.reset();
       
        rsac.removeImportRegistration(EasyMock.eq(i3));
        EasyMock.expectLastCall().once();
       
        c.replay();
       
        i3.close();
        i3.close(); // shouldn't change anything
       
        assertNull(i3.getImportedEndpointDescription());
View Full Code Here

        c.reset();
       
        rsac.removeImportRegistration(EasyMock.eq(i1));
        EasyMock.expectLastCall().once();
       
        c.replay();
       
       
        i1.close();
       
        c.verify();
View Full Code Here

        EasyMock.expectLastCall().once();
       
        sr.unregister();
        EasyMock.expectLastCall().once();
       
        c.replay();
       
        i2.close();

        c.verify();
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.