Sha256: ba5460e0517302536cd34311f965f94cd988d9ea2b515ddc523c017c994d7f32

Contents?: true

Size: 1.2 KB

Versions: 24

Compression:

Stored size: 1.2 KB

Contents

package org.embulk.output.mailchimp;

import org.embulk.output.mailchimp.validation.ColumnDataValidator;
import org.embulk.spi.Schema;
import org.junit.Assert;
import org.junit.Test;

import static org.embulk.spi.type.Types.STRING;

/**
 * Created by thangnc on 5/12/17.
 */
public class TestColumnDataValidator
{
    @Test
    public void test_checkExistColumns_valid()
    {
        Schema schema = Schema.builder()
                .add("email", STRING)
                .add("fname", STRING)
                .add("lname", STRING)
                .add("status", STRING)
                .build();

        Assert.assertEquals("Column should be exists",
                            true,
                            ColumnDataValidator.checkExistColumns(schema, "status", "email"));
    }

    @Test
    public void test_checkExistColumns_invalid()
    {
        Schema schema = Schema.builder()
                .add("email", STRING)
                .add("fname", STRING)
                .add("lname", STRING)
                .build();

        Assert.assertEquals("Column should be not exist",
                            false,
                            ColumnDataValidator.checkExistColumns(schema, "status", "email"));
    }
}

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
embulk-output-mailchimp-0.3.31 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.28 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.25 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.24 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.23 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.22 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.21 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.20 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.19 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.18 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.17 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.16 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.15 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.14 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.13 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.12 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.11 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.10 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.9 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java
embulk-output-mailchimp-0.3.7 src/test/java/org/embulk/output/mailchimp/TestColumnDataValidator.java