Package net.sourceforge.marathon.runtime

Examples of net.sourceforge.marathon.runtime.RuntimeStub


        return file;
    }

    @Test
    public void testMarathonTestCaseName() throws Exception {
        IMarathonRuntime runtime = new RuntimeStub();
        MarathonTestCase t = new MarathonTestCase(new File("/path/to/scriptboy.py"), runtime);
        assertEquals("scriptboy", t.getName());
    }
View Full Code Here


     * this testcase uses the file success.py contained in the same directory as
     * this testcase
     */
    @Test
    public void testRunSuccessfulTestCase() throws Throwable {
        RuntimeStub runtime = new RuntimeStub();
        MarathonTestCase t = new MarathonTestCase(new File("./success.py"), runtime);
        TestResult result = t.run();
        if (result.errorCount() > 0) {
            TestFailure failure = (TestFailure) result.errors().nextElement();
            throw failure.thrownException();
View Full Code Here

     * this testcase uses the file failure.py contained in the same directory as
     * this testcase
     */
    @Test
    public void testRunFailingTestCase() throws Exception {
        RuntimeStub runtime = new RuntimeStub();
        runtime.scriptsFail = true;
        MarathonTestCase t = new MarathonTestCase(new File("./failure.py"), runtime);
        TestResult result = t.run();
        assertEquals("test case should have failed", false, result.wasSuccessful());
        assertEquals("each failing testcase should have one failure, and no errors", 1, result.failureCount());
View Full Code Here

TOP

Related Classes of net.sourceforge.marathon.runtime.RuntimeStub

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.