Examples of assertCalled()


Examples of com.sun.sgs.test.util.DummyTransactionListener.assertCalled()

  /*
   * Don't know which listener's beforeCompletion method was called
   * first, so don't check if this one's was called.
   */
  listener.assertCalledAfter(CalledAfter.ABORT);
  failingListener.assertCalled(true, CalledAfter.ABORT);
    }

    @Test
    public void testRegisterListenerCommitAfterThrows() throws Exception {
  RuntimeException exception = new RuntimeException();
View Full Code Here

Examples of com.sun.sgs.test.util.DummyTransactionListener.assertCalled()

  DummyTransactionListener listener = new DummyTransactionListener();
  txn.registerListener(listener);
  /* Check that registering twice has no effect. */
  txn.registerListener(listener);
  txn.abort(abortXcp);
  listener.assertCalled(false, CalledAfter.ABORT);
    }

    @Test
    public void testRegisterListenerAbortAfterThrows() throws Exception {
  RuntimeException exception = new RuntimeException();
View Full Code Here

Examples of com.sun.sgs.test.util.DummyTransactionListener.assertCalled()

      handle.commit();
      fail("Expected TransactionAbortedException");
  } catch (TransactionAbortedException e) {
      System.err.println(e);
  }
  listener.assertCalled(true, CalledAfter.ABORT);
    }

    @Test
    public void testRegisterListenerAborting() {
  final DummyTransactionListener listener =
View Full Code Here

Examples of com.sun.sgs.test.util.DummyTransactionListener.assertCalled()

  if (exception[0] instanceof TransactionNotActiveException) {
      System.err.println(exception[0]);
  } else {
      fail("Expected TransactionNotActiveException: " + exception[0]);
  }
  listener.assertCalled(false, CalledAfter.NO);
    }

    @Test
    public void testRegisterListenerAborted() {
  DummyTransactionListener listener = new DummyTransactionListener();
View Full Code Here

Examples of com.sun.sgs.test.util.DummyTransactionListener.assertCalled()

      txn.registerListener(listener);
      fail("Expected TransactionNotActiveException");
  } catch (TransactionNotActiveException e) {
      System.err.println(e);
  }
  listener.assertCalled(false, CalledAfter.NO);
    }

    @Test
    public void testRegisterListenerPreparing() throws Exception {
  final DummyTransactionListener listener =
View Full Code Here

Examples of com.sun.sgs.test.util.DummyTransactionListener.assertCalled()

  if (exception[0] instanceof TransactionNotActiveException) {
      System.err.println(exception[0]);
  } else {
      fail("Expected TransactionNotActiveException: " + exception[0]);
  }
  listener.assertCalled(false, CalledAfter.NO);
    }

    @Test
    public void testRegisterListenerPrepareAndCommitting() throws Exception {
  final DummyTransactionListener listener =
View Full Code Here

Examples of com.sun.sgs.test.util.DummyTransactionListener.assertCalled()

  if (exception[0] instanceof TransactionNotActiveException) {
      System.err.println(exception[0]);
  } else {
      fail("Expected TransactionNotActiveException: " + exception[0]);
  }
  listener.assertCalled(false, CalledAfter.NO);
    }

    @Test
    public void testRegisterListenerCommitting() throws Exception {
  final DummyTransactionListener listener =
View Full Code Here

Examples of com.sun.sgs.test.util.DummyTransactionListener.assertCalled()

  if (exception[0] instanceof TransactionNotActiveException) {
      System.err.println(exception[0]);
  } else {
      fail("Expected TransactionNotActiveException: " + exception[0]);
  }
  listener.assertCalled(false, CalledAfter.NO);
    }

    @Test
    public void testRegisterListenerCommitted() throws Exception {
  DummyTransactionListener listener = new DummyTransactionListener();
View Full Code Here

Examples of com.sun.sgs.test.util.DummyTransactionListener.assertCalled()

      txn.registerListener(listener);
      fail("Expected TransactionNotActiveException");
  } catch (TransactionNotActiveException e) {
      System.err.println(e);
  }
  listener.assertCalled(false, CalledAfter.NO);
    }

    @Test
    public void testRegisterListenerBeforeCompletion() throws Exception {
  final DummyTransactionListener lateListener =
View Full Code Here

Examples of org.apache.aries.unittest.mocks.Skeleton.assertCalled()

   
    Skeleton.getSkeleton(service).assertCalledExactNumberOfTimes(new MethodCall(Runnable.class, "run"), 1);
   
    Skeleton skel = Skeleton.getSkeleton(mock.getBundleContext());
   
    skel.assertCalled(new MethodCall(BundleContext.class, "getServiceReferences", "java.lang.Runnable", null));

    ctx = new InitialContext(new Hashtable<Object, Object>());
   
    mock = new BundleMock("scooby.doo.2", new Properties());
   
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.