Package org.objectweb.celtix.ws.rm.persistence

Examples of org.objectweb.celtix.ws.rm.persistence.RMStore


        handler = control.createMock(RMHandler.class);
        address = control.createMock(EndpointReferenceType.class);       
    }  

    public void testSequenceAccess() {
        RMStore store = control.createMock(RMStore.class);
        EasyMock.expect(handler.getStore()).andReturn(store).times(2);
        store.createDestinationSequence(EasyMock.isA(RMDestinationSequence.class));
        EasyMock.expectLastCall();
        store.removeDestinationSequence(EasyMock.isA(Identifier.class));
        EasyMock.expectLastCall();
       
        control.replay();
        RMDestination d = new RMDestination(handler);
        Identifier sid = d.generateSequenceIdentifier();
View Full Code Here


        assertNotNull(d.getDestinationPolicies());
        control.verify();
    }

    public void testAcknowledge() throws SequenceFault {
        RMStore store = control.createMock(RMStore.class);
        EasyMock.expect(handler.getStore()).andReturn(store);
        store.createDestinationSequence(EasyMock.isA(RMDestinationSequence.class));
        EasyMock.expectLastCall();
        Configuration c = control.createMock(Configuration.class);      
        EasyMock.expect(handler.getConfiguration()).andReturn(c);
        EasyMock.expect(c.getObject(RMAssertionType.class, "rmAssertion")).andReturn(null);
        EasyMock.expect(handler.getConfiguration()).andReturn(c);
View Full Code Here

        }
        control.verify();
    }
   
    public void testRestore() {
        RMStore store = control.createMock(RMStore.class);       
        EasyMock.expect(handler.getStore()).andReturn(store);
        Configuration c = control.createMock(Configuration.class);
        EasyMock.expect(handler.getConfiguration()).andReturn(c);
        Configuration pc = control.createMock(Configuration.class);
        EasyMock.expect(c.getParent()).andReturn(pc);
        EasyMock.expect(pc.getId()).andReturn("endpoint");
        Collection<RMDestinationSequence> dss = new ArrayList<RMDestinationSequence>();
        EasyMock.expect(store.getDestinationSequences("endpoint")).andReturn(dss);
       
        control.replay();
        RMDestination d = new RMDestination(handler);
        d.restore();
        assertEquals(0, d.getAllSequences().size());
View Full Code Here

            }
        }
        if (includesAcked) {
            sequence.getIdentifier();
            EasyMock.expectLastCall().andReturn(id);
            RMStore store = control.createMock(RMStore.class);
            handler.getStore();
            EasyMock.expectLastCall().andReturn(store);
        }
        return sequence;
    }
View Full Code Here

        assertNotNull(s.getSequenceTerminationPolicy());
        control.verify();
    }
   
    public void testSequenceAccess() throws IOException, SequenceFault {
        RMStore store = control.createMock(RMStore.class);       
        expect(handler.getStore()).andReturn(store).times(3);
        store.createSourceSequence(EasyMock.isA(SourceSequence.class));
        expectLastCall().times(2);
        store.removeSourceSequence(EasyMock.isA(Identifier.class));

        control.replay();
        Identifier sid = s.generateSequenceIdentifier();
        SourceSequence seq = new SourceSequence(sid);
        assertNull(s.getCurrent());
View Full Code Here

        expectLastCall().andReturn(clonedCtx);
        msg.getContext();       
        expectLastCall().andReturn(ctx);
        seq.getIdentifier();
        expectLastCall().andReturn(sid);
        RMStore store = control.createMock(RMStore.class);
        handler.getStore();
        expectLastCall().andReturn(store);
        store.persistOutgoing(ss, msg);
        expectLastCall();
       
        control.replay();
        s.addUnacknowledged(ss, msg);
        control.verify();
View Full Code Here

        control.verify();
    }

   
    public void testSetAcknowledged() throws NoSuchMethodException, IOException {
        RMStore store = control.createMock(RMStore.class);       
        expect(handler.getStore()).andReturn(store);
        store.createSourceSequence(EasyMock.isA(SourceSequence.class));
        expectLastCall();
       
        control.replay();
       
        Identifier sid1 = s.generateSequenceIdentifier();
View Full Code Here

    public void testShutdown() {
        s.shutdown();
    }
   
    public void testRestore() {
        RMStore store = control.createMock(RMStore.class);       
        EasyMock.expect(handler.getStore()).andReturn(store);
        Configuration c = control.createMock(Configuration.class);
        EasyMock.expect(handler.getConfiguration()).andReturn(c);
        Configuration pc = control.createMock(Configuration.class);
        EasyMock.expect(c.getParent()).andReturn(pc);
        EasyMock.expect(pc.getId()).andReturn("endpoint");
        Identifier id = RMUtils.getWSRMFactory().createIdentifier();
        id.setValue("source1");
        SourceSequence ss = new SourceSequence(id);
        Collection<RMSourceSequence> sss = new ArrayList<RMSourceSequence>();
        sss.add(ss);
        EasyMock.expect(store.getSourceSequences("endpoint")).andReturn(sss);
        EasyMock.expect(handler.getStore()).andReturn(store);
        Collection<RMMessage> msgs = new ArrayList<RMMessage>();
        EasyMock.expect(store.getMessages(id, true)).andReturn(msgs);
        control.replay();
        s.restore();
        assertEquals(1, s.getAllSequences().size());
        control.verify();
    }
View Full Code Here

        s.getInitParam();
        EasyMock.expectLastCall().andReturn(new ArrayList<StoreInitParamType>());
        control.replay();
       
        RMStoreFactory factory = new RMStoreFactory();
        RMStore store = factory.getStore(c);
        assert store instanceof RMFileStore;
  
        control.verify();
    }
View Full Code Here

        c.getObject(StoreType.class, "store");
        EasyMock.expectLastCall().andReturn(s);
        control.replay();
       
        RMStoreFactory factory = new RMStoreFactory();
        RMStore store = factory.getStore(c);
        assert store instanceof RMFileStore;
       
        control.verify();
    }
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.ws.rm.persistence.RMStore

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.