Package org.easymock.classextension

Examples of org.easymock.classextension.IMocksControl.createMock()


        control.verify();
    }
   
    public void testStoreCreationNoParams() {
        IMocksControl control = EasyMock.createNiceControl();
        Configuration c = control.createMock(Configuration.class);       
        StoreType s = control.createMock(StoreType.class);
        c.getObject(StoreType.class, "store");
        EasyMock.expectLastCall().andReturn(s);
        s.getStoreClass();
        EasyMock.expectLastCall().andReturn("org.objectweb.celtix.bus.ws.rm.persistence.file.RMFileStore");
View Full Code Here


    }
   
    public void testStoreCreationNoParams() {
        IMocksControl control = EasyMock.createNiceControl();
        Configuration c = control.createMock(Configuration.class);       
        StoreType s = control.createMock(StoreType.class);
        c.getObject(StoreType.class, "store");
        EasyMock.expectLastCall().andReturn(s);
        s.getStoreClass();
        EasyMock.expectLastCall().andReturn("org.objectweb.celtix.bus.ws.rm.persistence.file.RMFileStore");
        s.getInitParam();
View Full Code Here

        control.verify();
    }
   
    public void testStoreCreationWithParams() {
        IMocksControl control = EasyMock.createNiceControl();
        Configuration c = control.createMock(Configuration.class)
        StoreType s = RMUtils.getWSRMConfFactory().createStoreType();
        s.setStoreClass("org.objectweb.celtix.bus.ws.rm.persistence.file.RMFileStore");
        StoreInitParamType param = RMUtils.getWSRMConfFactory().createStoreInitParamType();
        param.setParamName(RMFileStore.FILE_STORE_DIR);
        param.setParamValue("dbs/rm");
View Full Code Here

        store.createTables();    
    }

    public void testCreateDeleteSrcSequences() {
        IMocksControl control = EasyMock.createNiceControl();
        RMSourceSequence seq = control.createMock(RMSourceSequence.class);
        Identifier sid1 = RMUtils.getWSRMFactory().createIdentifier();
        sid1.setValue("sequence1");
        EasyMock.expect(seq.getIdentifier()).andReturn(sid1);
        EasyMock.expect(seq.getExpiry()).andReturn(null);
        EasyMock.expect(seq.getOfferingSequenceIdentifier()).andReturn(null);
View Full Code Here

      
    }
   
    public void testCreateDeleteDestSequences() {
        IMocksControl control = EasyMock.createNiceControl();
        RMDestinationSequence seq = control.createMock(RMDestinationSequence.class);
        Identifier sid1 = RMUtils.getWSRMFactory().createIdentifier();
        sid1.setValue("sequence1");
        EndpointReferenceType epr = RMUtils.createReference(Names.WSA_ANONYMOUS_ADDRESS);
        EasyMock.expect(seq.getIdentifier()).andReturn(sid1);
        EasyMock.expect(seq.getAcksTo()).andReturn(epr);       
View Full Code Here

      
    }
   
    public void testCreateDeleteMessages() throws IOException, SQLException  {
        IMocksControl control = EasyMock.createNiceControl();
        RMMessage msg = control.createMock(RMMessage.class);
        Identifier sid1 = RMUtils.getWSRMFactory().createIdentifier();
        sid1.setValue("sequence1");
        EasyMock.expect(msg.getMessageNr()).andReturn(BigInteger.ONE).times(2);
        InputStream is = new ByteArrayInputStream(new byte[89]);
        EasyMock.expect(msg.getContextAsStream()).andReturn(is).times(2);
View Full Code Here

        store.removeMessages(sid2, messageNrs, true);
    }
   
    public void testUpdateDestinationSequence() throws SQLException, IOException {
        IMocksControl control = EasyMock.createNiceControl();
        RMDestinationSequence seq = control.createMock(RMDestinationSequence.class);
        Identifier sid1 = RMUtils.getWSRMFactory().createIdentifier();
        sid1.setValue("sequence1");
        EndpointReferenceType epr = RMUtils.createReference(Names.WSA_ANONYMOUS_ADDRESS);
        EasyMock.expect(seq.getIdentifier()).andReturn(sid1);
        EasyMock.expect(seq.getAcksTo()).andReturn(epr);       
View Full Code Here

        store.removeDestinationSequence(sid1);
    }
   
    public void testUpdateSourceSequence() throws SQLException {
        IMocksControl control = EasyMock.createNiceControl();
        RMSourceSequence seq = control.createMock(RMSourceSequence.class);
        Identifier sid1 = RMUtils.getWSRMFactory().createIdentifier();
        sid1.setValue("sequence1");
        EasyMock.expect(seq.getIdentifier()).andReturn(sid1);
        EasyMock.expect(seq.getExpiry()).andReturn(null);
        EasyMock.expect(seq.getOfferingSequenceIdentifier()).andReturn(null);
View Full Code Here

   
    public void testConfigureSystemHandlers() {
        IMocksControl control = EasyMock.createControl();
        TestBinding b = new TestBinding();
        SystemHandlerChainType shc = null;
        Configuration c = control.createMock(Configuration.class);
        expect(c.getObject("systemHandlerChain")).andReturn(shc);
        control.replay();
       
        b.configureSystemHandlers(c);
        assertEquals(0, b.getPreLogicalSystemHandlers().size());
View Full Code Here

       
        control.verify();
        control.reset();
       
        shc = new ObjectFactory().createSystemHandlerChainType();
        c = control.createMock(Configuration.class);
        expect(c.getObject("systemHandlerChain")).andReturn(shc);
        control.replay();
       
        b.configureSystemHandlers(c);
        assertEquals(0, b.getPreLogicalSystemHandlers().size());
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.