Package org.haystack

Examples of org.haystack.HGrid.row()


        catch (UnknownRecException e) {
            verifyException(e);
        }
        sub = w.sub(new HRef[] { c.id(), badId, d.id() }, false);
        verifyEq(sub.numRows(), 3);
        verifyEq(sub.row(0).dis(), c.dis());
        verifyEq(sub.row(1).missing("id"), true);
        verifyEq(sub.row(2).dis(), d.dis());

        // verify state of watch now
        verify(client.watch(w.id()) == w);
View Full Code Here


            verifyException(e);
        }
        sub = w.sub(new HRef[] { c.id(), badId, d.id() }, false);
        verifyEq(sub.numRows(), 3);
        verifyEq(sub.row(0).dis(), c.dis());
        verifyEq(sub.row(1).missing("id"), true);
        verifyEq(sub.row(2).dis(), d.dis());

        // verify state of watch now
        verify(client.watch(w.id()) == w);
        verifyEq(client.watches().length, 1);
View Full Code Here

        }
        sub = w.sub(new HRef[] { c.id(), badId, d.id() }, false);
        verifyEq(sub.numRows(), 3);
        verifyEq(sub.row(0).dis(), c.dis());
        verifyEq(sub.row(1).missing("id"), true);
        verifyEq(sub.row(2).dis(), d.dis());

        // verify state of watch now
        verify(client.watch(w.id()) == w);
        verifyEq(client.watches().length, 1);
        verify(client.watches()[0] == w);
View Full Code Here

        client.eval("commit(diff(readById(@" + b.id().val + "), {javaTest:123}))");
        client.eval("commit(diff(readById(@" + d.id().val + "), {javaTest:456}))");
        poll = w.pollChanges();
        verifyEq(poll.numRows(), 2);
        HDict newb, newd;
        if (poll.row(0).id().equals(b.id())) {
            newb = poll.row(0);
            newd = poll.row(1);
        }
        else {
            newb = poll.row(1);
View Full Code Here

        client.eval("commit(diff(readById(@" + d.id().val + "), {javaTest:456}))");
        poll = w.pollChanges();
        verifyEq(poll.numRows(), 2);
        HDict newb, newd;
        if (poll.row(0).id().equals(b.id())) {
            newb = poll.row(0);
            newd = poll.row(1);
        }
        else {
            newb = poll.row(1);
            newd = poll.row(0);
View Full Code Here

        poll = w.pollChanges();
        verifyEq(poll.numRows(), 2);
        HDict newb, newd;
        if (poll.row(0).id().equals(b.id())) {
            newb = poll.row(0);
            newd = poll.row(1);
        }
        else {
            newb = poll.row(1);
            newd = poll.row(0);
        }
View Full Code Here

        if (poll.row(0).id().equals(b.id())) {
            newb = poll.row(0);
            newd = poll.row(1);
        }
        else {
            newb = poll.row(1);
            newd = poll.row(0);
        }
        verifyEq(newb.dis(), b.dis());
        verifyEq(newd.dis(), d.dis());
        verifyEq(newb.get("javaTest"), HNum.make(123));
View Full Code Here

            newb = poll.row(0);
            newd = poll.row(1);
        }
        else {
            newb = poll.row(1);
            newd = poll.row(0);
        }
        verifyEq(newb.dis(), b.dis());
        verifyEq(newd.dis(), d.dis());
        verifyEq(newb.get("javaTest"), HNum.make(123));
        verifyEq(newd.get("javaTest"), HNum.make(456));
View Full Code Here

        w.unsub(new HRef[] { d.id() });
        client.eval("commit(diff(readById(@" + b.id().val + "), {-javaTest}))");
        client.eval("commit(diff(readById(@" + d.id().val + "), {-javaTest}))");
        poll = w.pollChanges();
        verifyEq(poll.numRows(), 1);
        verifyEq(poll.row(0).dis(), b.dis());
        verifyEq(poll.row(0).has("javaTest"), false);

        // remove a and c and poll refresh
        w.unsub(new HRef[] { a.id(), c.id() });
        poll = w.pollRefresh();
View Full Code Here

        client.eval("commit(diff(readById(@" + b.id().val + "), {-javaTest}))");
        client.eval("commit(diff(readById(@" + d.id().val + "), {-javaTest}))");
        poll = w.pollChanges();
        verifyEq(poll.numRows(), 1);
        verifyEq(poll.row(0).dis(), b.dis());
        verifyEq(poll.row(0).has("javaTest"), false);

        // remove a and c and poll refresh
        w.unsub(new HRef[] { a.id(), c.id() });
        poll = w.pollRefresh();
        verifyEq(poll.numRows(), 1);
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.