Examples of expect()


Examples of org.jboss.cache.util.internals.ReplicationListener.expect()

      assertEquals(false, lockManager2.isLocked(cache2.getNode("/one")));
      assertEquals(false, lockManager2.isLocked(cache2.getNode("/one/two")));
      assertNotNull(cache2.getNode("/one").getChild("two"));
      assertNotNull(cache2.get(Fqn.fromString("/one/two"), "key1"));

      replListener2.expect(RemoveNodeCommand.class);
      replListener2.expect(CommitCommand.class);
      cache.removeNode("/one/two");
      replListener2.waitForReplicationToOccur(1000);

      assertEquals(false, cache.exists("/one/two"));
View Full Code Here

Examples of org.jboss.cache.util.internals.ReplicationListener.expect()

      assertEquals(false, lockManager2.isLocked(cache2.getNode("/one/two")));
      assertNotNull(cache2.getNode("/one").getChild("two"));
      assertNotNull(cache2.get(Fqn.fromString("/one/two"), "key1"));

      replListener2.expect(RemoveNodeCommand.class);
      replListener2.expect(CommitCommand.class);
      cache.removeNode("/one/two");
      replListener2.waitForReplicationToOccur(1000);

      assertEquals(false, cache.exists("/one/two"));
      assertEquals(null, cache.get("/one/two", "key1"));
View Full Code Here

Examples of org.jboss.cache.util.internals.ReplicationListener.expect()

      assertEquals("value", cache1.get(fqn, key));
      assertNull(cache2.get(fqn, key));
      assertNull(loader1.get(fqn));
      assertNull(loader2.get(fqn));

      replListener.expect(PrepareCommand.class);
      mgr1.commit();
      replListener.waitForReplicationToOccur(500);

      assertEquals("value", cache1.get(fqn, key));
      assertEquals("value", cache2.get(fqn, key));
View Full Code Here

Examples of org.jboss.cache.util.internals.ReplicationListener.expect()

      createCaches(false, true);

      ReplicationListener replListener = new ReplicationListener(cache2);

      mgr1.begin();
      replListener.expect(CommitCommand.class);
      cache1.put(fqn, key, "value");

      assertEquals("value", cache1.get(fqn, key));
      assertNull(cache2.get(fqn, key));
      assertNull(loader1.get(fqn));
View Full Code Here

Examples of org.jboss.cache.util.internals.replicationlisteners.ReplicationListener.expect()

      sas = new SetAttributesServlet(Collections.singletonMap(KEY, getAttributeValue(attr++)));
      InvalidationServlet invs = new InvalidationServlet();
      MultipleActionServlet mas = new MultipleActionServlet(sas, invs);
      ReplicationListener replListener1 = replListeners[1];
      replListener1.expectWithTx(PutDataMapCommand.class, RemoveNodeCommand.class);
      replListener1.expect(DataGravitationCleanupCommand.class);

      req = new Request(mgr0, sessionId, mas);
      req.execute();     
      replListener1.waitForReplicationToOccur();
View Full Code Here

Examples of org.jmock.Mock.expect()

        publisher.add((Subscriber) mockSubscriber.proxy());

        Message message = new Message();

        // expectations
        mockSubscriber.expect("receive", message);
       
        // execute
        publisher.publish(message);
       
        // verify
View Full Code Here

Examples of org.springframework.test.web.client.MockRestServiceServer.expect()

 
  private MockRestServiceServer setupMockRestServiceServer(NFJSLoader loader, int numberOfLoads) {
    MockRestServiceServer mockServer = MockRestServiceServer.createServer(loader.getRestTemplate());
    for (int i=0; i < numberOfLoads; i++) {
      mockServer.expect(
          requestTo("https://springone2gx.com/m/data/show_short.json?showId=" + SHOW_ID))
          .andExpect(method(GET))
          .andRespond(ResponseCreators.withSuccess(new ClassPathResource("show_short.json", NFJSLoaderTest.class), APPLICATION_JSON));
      mockServer.expect(
          requestTo("https://springone2gx.com/m/data/show_schedule.json?showId=" + SHOW_ID))
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.