Examples of expect()


Examples of org.apache.sling.commons.json.util.DespacedRendering.expect()

    }
   
    @Test
    public void testToJsonArray() throws JSONException {
        final DespacedRendering r = new DespacedRendering("{array:" + j.toJSONArray(j.names()).toString() + "}");
        r.expect("_thisstring_","12","42","true","json.stringhere");
    }
   
    @Test
    public void testWriteJsonArray() throws JSONException {
        final JSONArray a = j.toJSONArray(j.names());
View Full Code Here

Examples of org.apache.sling.commons.json.util.DespacedRendering.expect()

    public void testWriteJsonArray() throws JSONException {
        final JSONArray a = j.toJSONArray(j.names());
        final StringWriter w = new StringWriter();
        a.write(w);
        final DespacedRendering r = new DespacedRendering("{array:" + w.toString() + "}");
        r.expect("_thisstring_","12","42","true","json.stringhere");
    }
   
    @Test(expected=JSONException.class)
    public void testWriteJsonArrayException() throws JSONException {
        final JSONArray a = j.toJSONArray(j.names());
View Full Code Here

Examples of org.apache.sling.commons.json.util.DespacedRendering.expect()

    @Test
    public void testWrite() throws JSONException {
        final StringWriter w = new StringWriter();
        j.write(w);
        final DespacedRendering r = new DespacedRendering(w.toString());
        r.expect(
                "_long_:42",
                "_string_:_thisstring_",
                "_int_:12",
                "_k0_:{",
                "_name_:_k0_",
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.test.Fuzzer.expect()

        try (Fuzzer fuzzer = new Fuzzer(this); StacklessLogging logging = new StacklessLogging(Parser.class))
        {
            fuzzer.connect();
            fuzzer.setSendMode(Fuzzer.SendMode.BULK);
            fuzzer.send(send);
            fuzzer.expect(expect);
        }
    }

    /**
     * Send small text, then frame with opcode 13 (reserved), then ping
View Full Code Here

Examples of org.fusesource.restygwt.client.Options.expect()

                // use the default dispatcher configured for the service..
                p("__method.setDispatcher(this.dispatcher);");
            }

            // configure the expected statuses..
            if( options!=null && options.expect().length!=0 ) {
                // Using method level defined expected status
                p("__method.expect("+join(options.expect(), ", ")+");");
            } else if( classOptions!=null && classOptions.expect().length!=0 ) {
                // Using class level defined expected status
                p("__method.expect("+join(classOptions.expect(), ", ")+");");
View Full Code Here

Examples of org.infinispan.test.ReplListener.expect()

      assert !cache1.containsKey(key);
      assert !cache2.containsKey(key);
      ReplListener replListener2 = replListener(cache2);

      replListener2.expect(PutKeyValueCommand.class);
      cache1.putForExternalRead(key, value);
      replListener2.waitForRpc();

      assertEquals("PFER updated cache1", value, cache1.get(key));
      assertEquals("PFER propagated to cache2 as expected", value, cache2.get(key));
View Full Code Here

Examples of org.infinispan.test.ReplListener.expect()

      Cache<String, String> cache2 = cache(1, "replSync");
      TransactionManager tm1 = TestingUtil.getTransactionManager(cache1);
      TransactionManager tm2 = TestingUtil.getTransactionManager(cache2);
      ReplListener replListener2 = replListener(cache2);

      replListener2.expect(PutKeyValueCommand.class);
      tm1.begin();
      cache1.putForExternalRead(key, value);
      tm1.commit();
      replListener2.waitForRpc();
View Full Code Here

Examples of org.infinispan.test.ReplListener.expect()

      assert !cache1.containsKey(key);
      assert !cache2.containsKey(key);
      ReplListener replListener2 = replListener(cache2);

      replListener2.expect(PutKeyValueCommand.class);
      cache1.putForExternalRead(key, value);
      replListener2.waitForRpc();

      assertEquals("PFER updated cache1", value, cache1.get(key));
      assertEquals("PFER propagated to cache2 as expected", value, cache2.get(key));
View Full Code Here

Examples of org.infinispan.test.ReplListener.expect()

      Cache cache2 = cache(1, "replSync");
      TransactionManager tm1 = TestingUtil.getTransactionManager(cache1);
      TransactionManager tm2 = TestingUtil.getTransactionManager(cache2);
      ReplListener replListener2 = replListener(cache2);

      replListener2.expect(PutKeyValueCommand.class);
      tm1.begin();
      cache1.putForExternalRead(key, value);
      tm1.commit();
      replListener2.waitForRpc();
View Full Code Here

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

      assertEquals(0, cache.getTransactionTable().getNumGlobalTransactions());
      assertEquals(0, cache.getTransactionTable().getNumLocalTransactions());

      SamplePojo pojo = new SamplePojo(21, "test");

      replListener2.expect(PutKeyValueCommand.class, CommitCommand.class);
      cache.put("/one/two", "key1", pojo);

      mgr.commit();
      replListener2.waitForReplicationToOccur(1000);
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.