Package com.volantis.xml.pipeline.sax

Examples of com.volantis.xml.pipeline.sax.ResourceOwnerMock


     */
    public void testPushResourceOwnerNoTransactionSuppressRelease()
            throws Exception {
        TestRecoverableResourceOwnerStack trros =
                new TestRecoverableResourceOwnerStack();
        final ResourceOwnerMock toPushMock =
                 new ResourceOwnerMock("toPushMock", expectations);

        trros.push(toPushMock, false);

        assertSame("Unexpected object on stack.",
                toPushMock, trros.getStack().peek());
View Full Code Here


     */
    public void testPushResourceOwnerNoTransactionRequestRelease()
            throws Exception {
        TestRecoverableResourceOwnerStack trros =
                new TestRecoverableResourceOwnerStack();
        final ResourceOwnerMock toPushMock =
                 new ResourceOwnerMock("toPushMock", expectations);

        trros.push(toPushMock, true);

        Object onStack = trros.getStack().peek();
        assertSame("Unexpected object on stack.",
View Full Code Here

     */
    public void testPushResourceOwnerInTransactionSuppressRelease()
            throws Exception {
        TestRecoverableResourceOwnerStack trros =
                new TestRecoverableResourceOwnerStack();
        final ResourceOwnerMock toPushMock =
                 new ResourceOwnerMock("toPushMock", expectations);

        trros.startTransaction();
        trros.push(toPushMock, false);

        Object onStack = trros.getStack().peek();
View Full Code Here

     */
    public void testPushResourceOwnerInTransactionRequestRelease()
            throws Exception {
        TestRecoverableResourceOwnerStack trros =
                new TestRecoverableResourceOwnerStack();
        final ResourceOwnerMock toPushMock =
                 new ResourceOwnerMock("toPushMock", expectations);

        trros.startTransaction();
        trros.push(toPushMock, true);

        Object onStack = trros.getStack().peek();
View Full Code Here

     */
    public void testPushResourceOwnerNestedTransactionRequestRelease()
            throws Exception {
        TestRecoverableResourceOwnerStack trros =
                new TestRecoverableResourceOwnerStack();
        final ResourceOwnerMock toPushMock =
                 new ResourceOwnerMock("toPushMock", expectations);

        trros.startTransaction();
        trros.startTransaction();
        trros.push(toPushMock, true);

View Full Code Here

     */
    public void testPushResourceOwnerNestedTransaction2PushesRequestRelease()
            throws Exception {
        TestRecoverableResourceOwnerStack trros =
                new TestRecoverableResourceOwnerStack();
        final ResourceOwnerMock toPushMock =
                 new ResourceOwnerMock("toPushMock", expectations);

        trros.startTransaction();
        trros.push(toPushMock, true);
        trros.startTransaction();
        trros.push(toPushMock, true);
View Full Code Here

       
        final Object object = new Object();
        trros.push(object, false);
        assertSame("Unexpected object on stack.", object, trros.peek());
       
        final ResourceOwnerMock resource1Mock =
                 new ResourceOwnerMock("resource1Mock", expectations);
        trros.push(resource1Mock, true);
        Object onStack = trros.getStack().peek();
        assertSame("Unexpected object on stack.", resource1Mock,
                ((ReleasableResourceOwner) onStack).getResourceOwner());

        final ResourceOwnerMock resource2Mock =
                 new ResourceOwnerMock("resource2Mock", expectations);
        trros.push(resource2Mock, false);
        onStack = trros.getStack().peek();
        assertSame("Unexpected object on stack.", resource2Mock, onStack);
    }
View Full Code Here

     */
    public void testPopResourceOwnerNoTransactionRequestRelease()
            throws Exception {
        TestRecoverableResourceOwnerStack trros =
                new TestRecoverableResourceOwnerStack();
        final ResourceOwnerMock toPopMock =
                 new ResourceOwnerMock("toPopMock", expectations);
        trros.push(toPopMock, true);

        toPopMock.expects.release();

        Object popped = trros.pop();
View Full Code Here

     */
    public void testPopResourceOwnerNoTransactionSuppressRelease()
            throws Exception {
        TestRecoverableResourceOwnerStack trros =
                new TestRecoverableResourceOwnerStack();
        final ResourceOwnerMock toPopMock =
                 new ResourceOwnerMock("toPopMock", expectations);
        trros.push(toPopMock, false);

        Object popped = trros.pop();
        assertSame("Unexpected object popped.", toPopMock, popped);
        assertTrue("Expected popped stack to be empty.",
View Full Code Here

     */
    public void testPopResourceOwnerInTransactionRequestRelease()
            throws Exception {
        TestRecoverableResourceOwnerStack trros =
                new TestRecoverableResourceOwnerStack();
        final ResourceOwnerMock toPopMock =
                 new ResourceOwnerMock("toPopMock", expectations);
        trros.startTransaction();
        trros.push(toPopMock, true);

        Object popped = trros.pop();
        assertSame("Unexpected object popped.", toPopMock, popped);
View Full Code Here

TOP

Related Classes of com.volantis.xml.pipeline.sax.ResourceOwnerMock

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.