diff --git a/sharding-core/src/test/java/io/shardingsphere/core/yaml/sharding/YamlKeyGeneratorConfigurationTest.java b/sharding-core/src/test/java/io/shardingsphere/core/yaml/sharding/YamlKeyGeneratorConfigurationTest.java index f53fc7673e5878f5ab68fb4d1772aef57fd49082..2e12ee277302a4be5bb58ab2db79124bcb8f5f9a 100644 --- a/sharding-core/src/test/java/io/shardingsphere/core/yaml/sharding/YamlKeyGeneratorConfigurationTest.java +++ b/sharding-core/src/test/java/io/shardingsphere/core/yaml/sharding/YamlKeyGeneratorConfigurationTest.java @@ -17,9 +17,13 @@ package io.shardingsphere.core.yaml.sharding; +import io.shardingsphere.core.keygen.SnowflakeKeyGenerator; import org.junit.Before; import org.junit.Test; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; + public class YamlKeyGeneratorConfigurationTest { @Before @@ -27,38 +31,9 @@ public class YamlKeyGeneratorConfigurationTest { } @Test - public void testGetKeyGenerator() { - } - - @Test - public void testGetColumn() { - } - - @Test - public void testGetType() { - } - - @Test - public void testGetClassName() { - } - - @Test - public void testGetProps() { - } - - @Test - public void testSetColumn() { - } - - @Test - public void testSetType() { - } - - @Test - public void testSetClassName() { - } - - @Test - public void testSetProps() { + public void assertGetKeyGeneratorWithClassName() { + YamlKeyGeneratorConfiguration keyGeneratorConfiguration = new YamlKeyGeneratorConfiguration(); + keyGeneratorConfiguration.setClassName("io.shardingsphere.core.keygen.SnowflakeKeyGenerator"); + assertThat(keyGeneratorConfiguration.getKeyGenerator().getClass().getName(), is(SnowflakeKeyGenerator.class.getName())); } }