diff --git a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/IntegerPrimaryKeyIngestPositionTest.java b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/IntegerPrimaryKeyIngestPositionTest.java index 9153d853bd212..a1896b319d528 100644 --- a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/IntegerPrimaryKeyIngestPositionTest.java +++ b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/IntegerPrimaryKeyIngestPositionTest.java @@ -17,7 +17,6 @@ package org.apache.shardingsphere.data.pipeline.core.ingest.position.type.pk.type; -import org.apache.shardingsphere.data.pipeline.core.ingest.position.type.pk.PrimaryKeyIngestPositionFactory; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; @@ -25,13 +24,6 @@ class IntegerPrimaryKeyIngestPositionTest { - @Test - void assertInit() { - IntegerPrimaryKeyIngestPosition position = (IntegerPrimaryKeyIngestPosition) PrimaryKeyIngestPositionFactory.newInstance("i,1,100"); - assertThat(position.getBeginValue(), is(1L)); - assertThat(position.getEndValue(), is(100L)); - } - @Test void assertToString() { assertThat(new IntegerPrimaryKeyIngestPosition(1L, 100L).toString(), is("i,1,100")); diff --git a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/StringPrimaryKeyIngestPositionTest.java b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/StringPrimaryKeyIngestPositionTest.java index 0b0a9a2dad188..8cea55acf3ecc 100644 --- a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/StringPrimaryKeyIngestPositionTest.java +++ b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/StringPrimaryKeyIngestPositionTest.java @@ -17,31 +17,20 @@ package org.apache.shardingsphere.data.pipeline.core.ingest.position.type.pk.type; -import org.apache.shardingsphere.data.pipeline.core.ingest.position.type.pk.PrimaryKeyIngestPositionFactory; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.api.Assertions.assertNull; class StringPrimaryKeyIngestPositionTest { - @Test - void assertInit() { - StringPrimaryKeyIngestPosition position = (StringPrimaryKeyIngestPosition) PrimaryKeyIngestPositionFactory.newInstance("s,hi,jk"); - assertThat(position.getBeginValue(), is("hi")); - assertThat(position.getEndValue(), is("jk")); - } - @Test void assertToString() { assertThat(new StringPrimaryKeyIngestPosition("hi", "jk").toString(), is("s,hi,jk")); } @Test - void assertEmptyToNull() { - StringPrimaryKeyIngestPosition actual = (StringPrimaryKeyIngestPosition) PrimaryKeyIngestPositionFactory.newInstance("s,,"); - assertNull(actual.getBeginValue()); - assertNull(actual.getEndValue()); + void assertToStringWithNullValue() { + assertThat(new StringPrimaryKeyIngestPosition(null, null).toString(), is("s,,")); } } diff --git a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/UnsupportedKeyIngestPositionTest.java b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/UnsupportedKeyIngestPositionTest.java index 657a77c206a87..5bc5fc51afc89 100644 --- a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/UnsupportedKeyIngestPositionTest.java +++ b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/UnsupportedKeyIngestPositionTest.java @@ -17,22 +17,13 @@ package org.apache.shardingsphere.data.pipeline.core.ingest.position.type.pk.type; -import org.apache.shardingsphere.data.pipeline.core.ingest.position.type.pk.PrimaryKeyIngestPositionFactory; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.api.Assertions.assertNull; class UnsupportedKeyIngestPositionTest { - @Test - void assertInit() { - UnsupportedKeyIngestPosition position = (UnsupportedKeyIngestPosition) PrimaryKeyIngestPositionFactory.newInstance("u,,"); - assertNull(position.getBeginValue()); - assertNull(position.getEndValue()); - } - @Test void assertToString() { assertThat(new UnsupportedKeyIngestPosition().toString(), is("u,,"));