Examples of ExpectedAssertionFailure


Examples of net.sf.jsptest.assertion.ExpectedAssertionFailure

        h.append("</body></html>");
    }

    public void testPageShouldHaveTitle() throws Exception {
        testcase.page().shouldHaveTitle("PageTitle");
        new ExpectedAssertionFailure(testcase) {

            public void run() {
                page().shouldHaveTitle("Not the same");
            }
        };
View Full Code Here

Examples of net.sf.jsptest.assertion.ExpectedAssertionFailure

    public void testPageShouldContain() throws Exception {
        testcase.page().shouldContain("before div");
        testcase.page().shouldContain("inside div");
        testcase.page().shouldContain("after div");
        new ExpectedAssertionFailure(testcase) {

            protected void run() throws Exception {
                page().shouldContain("no such text on the page");
            }
        };
View Full Code Here

Examples of net.sf.jsptest.assertion.ExpectedAssertionFailure

        };
    }

    public void testPageShouldNotContain() throws Exception {
        testcase.page().shouldNotContain("no such text on the page");
        new ExpectedAssertionFailure(testcase) {

            protected void run() throws Exception {
                page().shouldNotContain("before div");
            }
        };
View Full Code Here

Examples of net.sf.jsptest.assertion.ExpectedAssertionFailure

        };
    }

    public void testPageDoesNotContainTextInsideComments() throws Exception {
        testcase.page().shouldNotContain("inside a comment");
        new ExpectedAssertionFailure(testcase) {

            protected void run() throws Exception {
                page().shouldContain("inside a comment");
            }
        };
View Full Code Here

Examples of net.sf.jsptest.assertion.ExpectedAssertionFailure

        };
    }

    public void testPageShouldNotContainItsTitle() throws Exception {
        testcase.page().shouldNotContain("PageTitle");
        new ExpectedAssertionFailure(testcase) {

            protected void run() throws Exception {
                page().shouldContain("PageTitle");
            }
        };
View Full Code Here

Examples of net.sf.jsptest.assertion.ExpectedAssertionFailure

        h.append("</body></html>");
    }

    public void testShouldHaveLinkWithText() throws Exception {
        testcase.page().shouldHaveLink().withText(LINK_TEXT);
        new ExpectedAssertionFailure(testcase) {

            public void run() {
                page().shouldHaveLink().withText("Foo");
            }
        };
View Full Code Here

Examples of net.sf.jsptest.assertion.ExpectedAssertionFailure

        };
    }

    public void testShouldHaveLinkWithPartialText() throws Exception {
        testcase.page().shouldHaveLink().withPartialText(LINK_TEXT.substring(1, 3));
        new ExpectedAssertionFailure(testcase) {

            public void run() {
                page().shouldHaveLink().withPartialText("Foo");
            }
        };
View Full Code Here

Examples of net.sf.jsptest.assertion.ExpectedAssertionFailure

        };
    }

    public void testShouldHaveLinkWithName() throws Exception {
        testcase.page().shouldHaveLink().withName(LINK_NAME);
        new ExpectedAssertionFailure(testcase) {

            public void run() {
                page().shouldHaveLink().withName("Foo");
            }
        };
View Full Code Here

Examples of net.sf.jsptest.assertion.ExpectedAssertionFailure

        };
    }

    public void testShouldHaveLinkWithId() throws Exception {
        testcase.page().shouldHaveLink().withId(LINK_ID);
        new ExpectedAssertionFailure(testcase) {

            public void run() {
                page().shouldHaveLink().withId("Foo");
            }
        };
View Full Code Here

Examples of net.sf.jsptest.assertion.ExpectedAssertionFailure

        };
    }

    public void testShouldHaveLinkWithHref() throws Exception {
        testcase.page().shouldHaveLink().withHref(LINK_HREF);
        new ExpectedAssertionFailure(testcase) {

            public void run() {
                page().shouldHaveLink().withHref("Foo");
            }
        };
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.