Package org.jitterbit.integration.data

Examples of org.jitterbit.integration.data.ValidationMessageCollectorImpl$ResultImpl


   
    @Test
    public void ensureCollectorIsNotified() {
        loc.setLogin("user");
        loc.setFileFilter(new FileFilter("data.txt"));
        ValidationMessageCollectorImpl collector = new ValidationMessageCollectorImpl(ValidationContext.EMPTY);
        validator.setMessageCollector(collector);
        validator.validate();
        LocationValidationTestUtils.ensureOneFatalMessage(collector, FileLocationError.MISSING_PATH);
    }
View Full Code Here


   
    @Test
    public void ensureCollectorIsNotified() {
        loc.setLinesToIgnore(new IgnoredLines(12, -12));
        loc.setRenameFileTo("newName.txt");
        ValidationMessageCollectorImpl collector = new ValidationMessageCollectorImpl(ValidationContext.EMPTY);
        validator.setMessageCollector(collector);
        validator.validate();
        LocationValidationTestUtils.ensureOneFatalMessage(collector, IgnoredLines.INVALID_IGNORE_LAST);
    }
View Full Code Here

    }
   
    @Test
    public void ensureCollectorIsNotified() {
        loc.setDriver(createDriver());
        ValidationMessageCollectorImpl collector = new ValidationMessageCollectorImpl(ValidationContext.EMPTY);
        validator.setMessageCollector(collector);
        validator.validate();
        LocationValidationTestUtils.ensureOneFatalMessage(collector, MISSING_SERVER);
    }
View Full Code Here

        assertFalse(validator.validate().contains(HttpLocationValidator.MISSING_URL));
    }

    @Test
    public void ensureCollectorIsNotified() {
        ValidationMessageCollectorImpl collector = new ValidationMessageCollectorImpl(ValidationContext.EMPTY);
        validator.setMessageCollector(collector);
        validator.validate();
        LocationValidationTestUtils.ensureOneFatalMessage(collector, HttpLocationValidator.MISSING_URL);
    }
View Full Code Here

        assertFalse(validator.validate().contains(LdapLocationValidator.INVALID_PORT));
    }
   
    @Test
    public void ensureCollectorIsNotified() {
        ValidationMessageCollectorImpl collector = new ValidationMessageCollectorImpl(ValidationContext.EMPTY);
        validator.setMessageCollector(collector);
        validator.validate();
        LocationValidationTestUtils.ensureOneFatalMessage(collector, LdapLocationValidator.MISSING_SERVER);
    }
View Full Code Here

   
    @Test
    public void ensureCollectorIsNotified() {
        loc.setLogin("user");
        loc.setFileFilter(new FileFilter("data.txt"));
        ValidationMessageCollectorImpl collector = new ValidationMessageCollectorImpl(ValidationContext.EMPTY);
        validator.setMessageCollector(collector);
        validator.validate();
        LocationValidationTestUtils.ensureOneFatalMessage(collector, FtpLocationError.MISSING_HOST);
    }
View Full Code Here

     *            the context in which this instance is validated.
     * @return a <code>ValidationResult</code> describing the result of the validation. This method
     *         never returns <code>null</code>.
     */
    public final ValidationResult validate(ValidationContext context) {
        ValidationMessageCollectorImpl collector = new ValidationMessageCollectorImpl(context);
        ValidationResult result;
        synchronized (getDataLock()) {
            collector.collect(this);
            result = collector.result();
            currentValidationResult = result;
        }
        notifyValidationListeners(result);
        return result;
    }
View Full Code Here

    private void validateStructure(TextStructure struct) {
        TextDocument doc = new TextDocument("X");
        doc.setDelimiter(FieldDelimiter.COMMA);
        doc.setStructure(struct);
        ValidationMessageCollectorImpl collector = new ValidationMessageCollectorImpl(ValidationContext.EMPTY);
        TextDocumentValidator validator = new TextDocumentValidator(doc, collector);
        validator.run();
        assertSame(ValidationStatus.VALID, collector.result().status());
    }
View Full Code Here

        doc.setStringQualifier("Newman!");
        runValidation(doc, ValidationStatus.INVALID);
    }

    private void runValidation(TextDocument doc, ValidationStatus expected) {
        ValidationMessageCollectorImpl c = new ValidationMessageCollectorImpl(ValidationContext.EMPTY);
        new TextDocumentValidator(doc, c).run();
        assertEquals(c.result().status(), expected);
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.ValidationMessageCollectorImpl$ResultImpl

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.