コード例 #1
0
  public void testInvokeServiceCSVDataService() throws Exception {
    CSVDataService csvDataService = new CSVDataService(browser);

    String serviceName = "CSVDataService";
    String csvExpectedResult = "Boston";

    String result =
        csvDataService.tryCSVDataService(
            serviceName, "getAllCustomer", "urn:getAllCustomer", "http://ws.wso2.org/dataservice");
    assertEquals(csvExpectedResult, result);
  }
コード例 #2
0
  public void testCreatCSVDataService() throws Exception {
    SeleniumTestBase seleniumTestBase = new SeleniumTestBase(browser);
    CSVDataService csvDataService = new CSVDataService(browser);

    seleniumTestBase.loginToUI(username, password);

    csvDataService.newDataService("CSVDataService", "Sample data service");
    csvDataService.newCSVDataSource(
        "CSVDataSource", "DataServiceCSVResource.csv", "id,name,address", "1,2,3", 2);
    csvDataService.addCSVQuery("q1", "CSVDataSource", "customers", "customer");
    csvDataService.addOutputMapping("element", "id", "1");
    csvDataService.addOutputMapping("element", "name", "2");
    csvDataService.addOutputMapping("attribute", "address", "3");
    csvDataService.gotoMainConfiguration();
    csvDataService.addOperation("getAllCustomer", "q1");
    csvDataService.checkService("CSVDataService");
  }