/**
* Test passing <Parameter>List to Command through program
* @throws Exception
*/
public void testProgrammaticCommandNamedParameters() throws Exception {
ConfigHelper helper = new ConfigHelper();
//Command insertAdhoc = das.createCommand("insert into CUSTOMER values (?, ?, ?)");
org.apache.tuscany.das.rdb.config.Command insertAdhoc = ConfigFactory.INSTANCE.createCommand();
insertAdhoc.setKind("insert");
insertAdhoc.setSQL("insert into CUSTOMER values (?, ?, ?)");
insertAdhoc.setName("insertCustomer");
Parameter parameter1 = ConfigFactory.INSTANCE.createParameter();
parameter1.setName("ID");
Parameter parameter2 = ConfigFactory.INSTANCE.createParameter();
parameter2.setName("LASTNAME");
Parameter parameter3 = ConfigFactory.INSTANCE.createParameter();
parameter3.setName("ADDRESS");
insertAdhoc.getParameter().add(parameter1);
insertAdhoc.getParameter().add(parameter2);
insertAdhoc.getParameter().add(parameter3);
Config cfg = helper.getConfig();
cfg.getCommand().add(insertAdhoc);
DAS das = DAS.FACTORY.createDAS(cfg, getConnection());
//setup is over, now set values in params and execute
Command insert = das.getCommand("insertCustomer");