Package com.consol.citrus.actions

Examples of com.consol.citrus.actions.ExecuteSQLAction


        builder.execute();
       
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), ExecuteSQLAction.class);
       
        ExecuteSQLAction action = (ExecuteSQLAction)builder.testCase().getActions().get(0);
        Assert.assertEquals(action.getName(), "sql");
        Assert.assertEquals(action.getStatements().toString(), "[Test Statement, Test2 Statement, Test3 Statement]");
        Assert.assertEquals(action.isIgnoreErrors(), false);
        Assert.assertEquals(action.getDataSource(), dataSource);
    }
View Full Code Here


        builder.execute();
       
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), ExecuteSQLAction.class);

        ExecuteSQLAction action = (ExecuteSQLAction)builder.testCase().getActions().get(0);
        Assert.assertEquals(action.getName(), "sql");
        Assert.assertEquals(action.isIgnoreErrors(), true);
        Assert.assertEquals(action.getDataSource(), dataSource);
        Assert.assertEquals(action.getSqlResourcePath(), "classpath:some.file");
       
        verify(resource, file);
    }
View Full Code Here

    public void testSQLActionParser() {
        assertActionCount(2);
        assertActionClassAndName(ExecuteSQLAction.class, "sqlUpdate:testDataSource");
       
        // 1st action
        ExecuteSQLAction action = getNextTestActionFromTest();
        Assert.assertNotNull(action.getDataSource());
        Assert.assertNull(action.getSqlResourcePath());
        Assert.assertEquals(action.getStatements().size(), 2);
        Assert.assertEquals(action.getStatements().get(0), "insert into foo_table values (foo, foo)");
        Assert.assertEquals(action.getStatements().get(1), "update foo_table set foo=foo where foo=foo");
        Assert.assertEquals(action.isIgnoreErrors(), false);
       
        // 2nd action
        action = getNextTestActionFromTest();
        Assert.assertNotNull(action.getDataSource());
        Assert.assertNotNull(action.getSqlResourcePath());
        Assert.assertEquals(action.getSqlResourcePath(), "classpath:com/consol/citrus/actions/test-sql-statements.sql");
        Assert.assertEquals(action.getStatements().size(), 0);
        Assert.assertEquals(action.isIgnoreErrors(), true);
    }
View Full Code Here

TOP

Related Classes of com.consol.citrus.actions.ExecuteSQLAction

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.