Package com.salesforce.dataloader.controller

Examples of com.salesforce.dataloader.controller.Controller


    @Test
    public void testDeleteAccountCsv() throws Exception {
        AccountIdTemplateListener listener = new AccountIdTemplateListener(100);
        String deleteFileName = convertTemplateToInput(baseName + "Template.csv", baseName + ".csv", listener);
        Map<String, String> argMap = getTestConfig(OperationInfo.delete, deleteFileName, false);
        Controller theController = runProcess(argMap, 100);
        verifySuccessIds(theController, listener.getAccountIds());
    }
View Full Code Here


        Map<String, String> argumentMap = getTestConfig(OperationInfo.insert, getTestDataDir()
                + "/timeZoneFormatTestingWithErrors.csv", false);
        argumentMap.put(Config.LOAD_ROW_TO_START_AT, rowOffset.toString());

        // insert into the account on the custom fields specified
        Controller controller = runProcessWithErrors(argumentMap, numSuccesses, numFailures);

        verifyErrors(controller, "Error converting value to correct data type: Failed to parse date: ");

        SObject[] returnedAccounts = retrieveAccounts(controller, dateField);
View Full Code Here

        // hard delete
        AccountIdTemplateListener listener = new AccountIdTemplateListener(100);

        // set batch process parameters
        Map<String, String> argMap = getHardDeleteTestConfig(listener);
        Controller theController = runProcess(argMap, 100);
        verifySuccessIds(theController, listener.getAccountIds());
    }
View Full Code Here

    @Test
    public void testHardDeleteInvalidInput() throws Exception {
        // do an insert of some account records to ensure there is some data
        // to hard delete
        Map<String, String> argMap = getHardDeleteTestConfig(new InvalidIdTemplateListener(0));
        Controller theController = runProcessWithErrors(argMap, 0, 1);

        // verify there were errors during operation
        verifyErrors(theController, "MALFORMED_ID:malformed id abcde0123456789XYZ");
    }
View Full Code Here

    public void testHardDeleteInvalidIDFailsOtherValidIDPasses() throws Exception {
        // do an insert of some account records to ensure there is some data to
        // hard delete
        InvalidIdTemplateListener listener = new InvalidIdTemplateListener(2);
        Map<String, String> argMap = getHardDeleteTestConfig(listener);
        Controller theController = runProcessWithErrors(argMap, 2, 1);

        // verify there were errors during operation
        verifyErrors(theController, "MALFORMED_ID:malformed id abcde0123456789XYZ");

        // verify that the value of ids in success file matches the actual input
View Full Code Here

    @Test
    public void testHardDeleteIDFromOtherObjectFails() throws Exception {
        // set batch process parameters
        Map<String, String> argMap = getHardDeleteTestConfig(new AccountIdTemplateListener(1));
        argMap.put(Config.ENTITY, "Contact");
        Controller theController = runProcessWithErrors(argMap, 0, 1);

        // verify there were errors during operation
        verifyErrors(theController, "INVALID_ID_FIELD:Invalid Id for entity type 'Contact'");
    }
View Full Code Here

    public void testHardDeleteSameObjectIDSucceedsOtherObjectIDFails() throws Exception {
        // do an insert of some account records to ensure there is some data to
        // hard delete
        HeterogeneousIdTemplateListener listener = new HeterogeneousIdTemplateListener(1, 1);
        Map<String, String> argMap = getHardDeleteTestConfig(listener);
        Controller theController = runProcessWithErrors(argMap, 1, 1);

        // verify there were errors during operation
        verifyErrors(theController, "INVALID_ID_FIELD:Invalid Id for entity type 'Account'");

        // verify the id value matches the input id value for the 1 successful
View Full Code Here

        final ProcessRunner runner = ProcessRunner.getInstance(argMap);
        runner.setName(this.baseName);

        final TestProgressMontitor monitor = new TestProgressMontitor();
        runner.run(monitor);
        Controller controller = runner.getController();

        // verify process completed as expected
        if (expectProcessSuccess) {

            verifyInsertCorrectByContent(controller, createAttachmentFileMap(files), myAttachmentTemplateListener);
View Full Code Here

        final ProcessRunner runner = ProcessRunner.getInstance(argMap);
        runner.setName(this.baseName);

        final TestProgressMontitor monitor = new TestProgressMontitor();
        runner.run(monitor);
        Controller controller = runner.getController();

        // verify process completed as expected
        String actualMessage = monitor.getMessage();
        if (expectProcessSuccess) {
View Full Code Here

        super(controller, opInfo);
    }

    @Override
    protected ExtractionPage setPages() {
        final Controller controller = getController();
        addPage(new ExtractionDataSelectionPage(controller ));
        ExtractionPage soqlPage = new ExtractionSOQLPage(controller);
        addPage(soqlPage);
        ExtractionPage finishPage = soqlPage;
        if (getConfig().getBoolean(Config.ENABLE_EXTRACT_STATUS_OUTPUT)) {
View Full Code Here

TOP

Related Classes of com.salesforce.dataloader.controller.Controller

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.