Package org.seleniumhq.selenium.fluent.internal

Examples of org.seleniumhq.selenium.fluent.internal.Context


        }
    }

    @Test
    public void runtimeExceptionShouldBeWrappedAndReThrown() {
        Context ctx = Context.singular(null, "dummy2");
        try {
            new TestableString(new Execution<String>() {
                public String execute() {
                    throw new RuntimeException("oops");
                }
View Full Code Here


        }
    }

    @Test
    public void stringShouldNotBeSomething() {
        Context ctx = Context.singular(null, "dummy2");
        new TestableString(FOO_EXECUTION, ctx, new Monitor.NULL()).shouldNotBe("bar");
        try {
            new TestableString(FOO_EXECUTION, ctx, new Monitor.NULL()).shouldNotBe("foo");
            fail("should have barfed");
        } catch (FluentExecutionStopped e) {
View Full Code Here

        }
    }

    @Test
    public void stringShouldNotBeSomethingWithinSomeTime() {
        Context ctx = Context.singular(null, "dummy2");
        new TestableString(FOO_EXECUTION, ctx, new Monitor.NULL()).within(secs(1)).shouldNotBe("bar");
        try {
            new TestableString(FOO_EXECUTION, ctx, new Monitor.NULL()).within(secs(1)).shouldNotBe("foo");
            fail("should have barfed");
        } catch (FluentExecutionStopped e) {
View Full Code Here

        }
    }
   
    @Test
    public void stringShouldContainSomething() {
        Context ctx = Context.singular(null, "dummy2");
        new TestableString(FOO_EXECUTION, ctx, new Monitor.NULL()).shouldContain("o");
        try {
            new TestableString(FOO_EXECUTION, ctx, new Monitor.NULL()).shouldContain("a");
            fail("should have barfed");
        } catch (FluentExecutionStopped e) {
View Full Code Here

        }
    }

    @Test
    public void stringShouldContainSomethingWithinSomeTime() {
        Context ctx = Context.singular(null, "dummy2");
        new TestableString(FOO_EXECUTION, ctx, new Monitor.NULL()).within(secs(1)).shouldContain("o");
        try {
            new TestableString(FOO_EXECUTION, ctx, new Monitor.NULL()).within(secs(1)).shouldContain("a");
            fail("should have barfed");
        } catch (FluentExecutionStopped e) {
View Full Code Here

        }
    }

    @Test
    public void stringShouldNotContainSomething() {
        Context ctx = Context.singular(null, "dummy2");
        new TestableString(FOO_EXECUTION, ctx, new Monitor.NULL()).shouldNotContain("a");
        try {
            new TestableString(FOO_EXECUTION, ctx, new Monitor.NULL()).shouldNotContain("o");
            fail("should have barfed");
        } catch (FluentExecutionStopped e) {
View Full Code Here

        }
    }

    @Test
    public void stringShouldNotContainSomethingWithinSomeTime() {
        Context ctx = Context.singular(null, "dummy2");
        new TestableString(FOO_EXECUTION, ctx, new Monitor.NULL()).within(secs(1)).shouldNotContain("a");
        try {
            new TestableString(FOO_EXECUTION, ctx, new Monitor.NULL()).within(secs(1)).shouldNotContain("o");
            fail("should have barfed");
        } catch (FluentExecutionStopped e) {
View Full Code Here

        }
    }

    @Test
    public void stringShouldRegexMatchSomething() {
        Context ctx = Context.singular(null, "dummy2");
        new TestableString(MARY_EXECUTION, ctx, new Monitor.NULL()).shouldMatch(".* Has \\d\\d.*");
        try {
            new TestableString(MARY_EXECUTION, ctx, new Monitor.NULL()).shouldMatch(".* blort \\d\\d.*");
            fail("should have barfed");
        } catch (FluentExecutionStopped e) {
View Full Code Here

        }
    }

    @Test
    public void stringShouldRegexMatchSomethingEvenIfThereAreNewlines() {
        Context ctx = Context.singular(null, "dummy2");
        new TestableString(MARY_EXECUTION_WITH_NEWLINES, ctx, new Monitor.NULL()).shouldMatch("(.*)12(.*)");
    }
View Full Code Here

        new TestableString(MARY_EXECUTION_WITH_NEWLINES, ctx, new Monitor.NULL()).shouldMatch("(.*)12(.*)");
    }

    @Test
    public void stringShouldNotRegexMatchSomething() {
        Context ctx = Context.singular(null, "dummy2");
        new TestableString(MARY_EXECUTION, ctx, new Monitor.NULL()).shouldNotMatch(".* blort \\d\\d.*");
        try {
            new TestableString(MARY_EXECUTION, ctx, new Monitor.NULL()).shouldNotMatch(".* Has \\d\\d.*");
            fail("should have barfed");
        } catch (FluentExecutionStopped e) {
View Full Code Here

TOP

Related Classes of org.seleniumhq.selenium.fluent.internal.Context

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.