Examples of Tester


Examples of org.apache.wicket.threadtest.tester.Tester

    }

    SimpleGetCommand getCmd = new SimpleGetCommand(gets, 5);

    // getCmd.setPrintResponse(true);
    Tester tester = new Tester(getCmd, 100, false);
    tester.run();
  }
View Full Code Here

Examples of org.apache.wicket.threadtest.tester.Tester

// Thread.sleep(5000);

    WicketObjects.setObjectStreamFactory(new WicketObjectStreamFactory());
    SimpleGetCommand getCmd = new SimpleGetCommand(gets, 10);
    // getCmd.setPrintResponse(true);
    Tester tester = new Tester(getCmd, 100, true);
    tester.run();
  }
View Full Code Here

Examples of org.apache.wicket.threadtest.tester.Tester

    List<String> gets = Arrays.asList(new String[] { "/app1/wicket/bookmarkable/org.apache.wicket.threadtest.apps.app1.Home" });

    SimpleGetCommand getCmd = new SimpleGetCommand(gets, 5);

    // getCmd.setPrintResponse(true);
    Tester tester = new Tester(getCmd, 100, false);
    tester.run();
  }
View Full Code Here

Examples of org.apache.wicket.threadtest.tester.Tester

// Thread.sleep(5000);

    WicketObjects.setObjectStreamFactory(new WicketObjectStreamFactory());
    SimpleGetCommand getCmd = new SimpleGetCommand(gets, 10);
    // getCmd.setPrintResponse(true);
    Tester tester = new Tester(getCmd, 100, true);
    tester.run();
  }
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.extensions.ExtensionTool.Tester

     * Section 8.2.3.4: Using a DEFLATE Block with BFINAL Set to 1
     */
    @Test
    public void testDraft15_DeflateBlockWithBFinal1()
    {
        Tester tester = clientExtensions.newTester("permessage-deflate");

        tester.assertNegotiated("permessage-deflate");

        tester.parseIncomingHex(// 1 message
                "0xc1 0x08", // header
                "0xf3 0x48 0xcd 0xc9 0xc9 0x07 0x00 0x00" // example payload
        );

        tester.assertHasFrames("Hello");
    }
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.extensions.ExtensionTool.Tester

     * Section 8.2.3.3: Using a DEFLATE Block with No Compression
     */
    @Test
    public void testDraft15_DeflateBlockWithNoCompression()
    {
        Tester tester = clientExtensions.newTester("permessage-deflate");

        tester.assertNegotiated("permessage-deflate");

        tester.parseIncomingHex(// 1 message / no compression
                "0xc1 0x0b 0x00 0x05 0x00 0xfa 0xff 0x48 0x65 0x6c 0x6c 0x6f 0x00" // example frame
        );

        tester.assertHasFrames("Hello");
    }
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.extensions.ExtensionTool.Tester

     * Section 8.2.3.1: A message compressed using 1 compressed DEFLATE block
     */
    @Test
    public void testDraft15_Hello_UnCompressedBlock()
    {
        Tester tester = clientExtensions.newTester("permessage-deflate");

        tester.assertNegotiated("permessage-deflate");

        tester.parseIncomingHex(//basic, 1 block, compressed with 0 compression level (aka, uncompressed).
                "0xc1 0x07 0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00" // example frame
        );

        tester.assertHasFrames("Hello");
    }
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.extensions.ExtensionTool.Tester

     * Section 8.2.3.1: A message compressed using 1 compressed DEFLATE block (with fragmentation)
     */
    @Test
    public void testDraft15_Hello_UnCompressedBlock_Fragmented()
    {
        Tester tester = clientExtensions.newTester("permessage-deflate");

        tester.assertNegotiated("permessage-deflate");

        tester.parseIncomingHex(// basic, 1 block, compressed with 0 compression level (aka, uncompressed).
                // Fragment 1
                "0x41 0x03 0xf2 0x48 0xcd",
                // Fragment 2
                "0x80 0x04 0xc9 0xc9 0x07 0x00");

        tester.assertHasFrames(
                new TextFrame().setPayload("He").setFin(false),
                new ContinuationFrame().setPayload("llo").setFin(true));
    }
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.extensions.ExtensionTool.Tester

     * Section 8.2.3.2: Sharing LZ77 Sliding Window
     */
    @Test
    public void testDraft15_SharingL77SlidingWindow_ContextTakeover()
    {
        Tester tester = clientExtensions.newTester("permessage-deflate");

        tester.assertNegotiated("permessage-deflate");

        tester.parseIncomingHex( // context takeover (2 messages)
                // message 1
                "0xc1 0x07", // (HEADER added for this test)
                "0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00",
                // message 2
                "0xc1 0x07", // (HEADER added for this test)
                "0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00");

        tester.assertHasFrames("Hello", "Hello");
    }
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.extensions.ExtensionTool.Tester

     * Section 8.2.3.2: Sharing LZ77 Sliding Window
     */
    @Test
    public void testDraft15_SharingL77SlidingWindow_NoContextTakeover()
    {
        Tester tester = clientExtensions.newTester("permessage-deflate");

        tester.assertNegotiated("permessage-deflate");

        tester.parseIncomingHex(// 2 message, shared LZ77 window
                // message 1
                "0xc1 0x07", // (HEADER added for this test)
                "0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00",
                // message 2
                "0xc1 0x05", // (HEADER added for this test)
                "0xf2 0x00 0x11 0x00 0x00"
        );

        tester.assertHasFrames("Hello", "Hello");
    }
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.