Package net.thucydides.core.model

Examples of net.thucydides.core.model.FailureCause


                "Driver info: driver.version: RemoteWebDriver\n" +
                "Build info: version: '2.6.0', revision: '13840', time: '2011-09-13 16:51:41'\n" +
                "System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.1', java.version: '1.6.0_26'\n" +
                "Driver info: driver.version: unknown>";

        Screenshot screenshot = new Screenshot("wikipedia.png", "Wikipedia", 805, new FailureCause(new AssertionError(errorMessage)));

        assertThat(screenshot.getShortErrorMessage(), is("Unable to locate element: {'method':'name','selector':'fieldDoesNotExist'}; duration or timeout: 8 milliseconds"));
    }
View Full Code Here


    @Test
    public void should_only_display_the_first_line_of_a_simple_error_message_in_the_UI() {
        String errorMessage = "Something broke";

        Screenshot screenshot = new Screenshot("wikipedia.png", "Wikipedia", 805, new FailureCause(new AssertionError(errorMessage)));

        assertThat(screenshot.getShortErrorMessage(), is("Something broke"));
    }
View Full Code Here

    @Test
    public void should_make_error_message_javascript_safe() {
        String errorMessage = "Expected: \"red\" but: was red's color(\"reddish\")";

        Screenshot screenshot = new Screenshot("wikipedia.png", "Wikipedia", 805, new FailureCause(new AssertionError(errorMessage)));

        assertThat(screenshot.getShortErrorMessage(), is("Expected: "red" but: was red's color("reddish")"));
    }
View Full Code Here

TOP

Related Classes of net.thucydides.core.model.FailureCause

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.