Package com.mastfrog.netty.http.test.harness.TestHarness

Examples of com.mastfrog.netty.http.test.harness.TestHarness.CallResult


    @Test
    public void test(TestHarness harn) throws Throwable {
        assertTrue(true);
        CookieStore store = new CookieStore();
        CallResult res = harn.get("/ok").setCookieStore(store).go().assertStatus(OK);
        res.assertHasHeader(Headers.SET_COOKIE.name());
        assertTrue(store.iterator().hasNext());
        res.assertCookieValue("xid", "1").throwIfError();

        res = harn.get("/ok").setCookieStore(store).go().assertStatus(OK);
        res.assertCookieValue("xid", "2");
        res.throwIfError();
        assertEquals(store + " " + store.size(), 1, store.size());
        Iterator<Cookie> iter = store.iterator();
        assertTrue(store + "", iter.hasNext());
        iter.next();
        assertFalse(store + "", iter.hasNext());
View Full Code Here

TOP

Related Classes of com.mastfrog.netty.http.test.harness.TestHarness.CallResult

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.