You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2020/08/16 14:49:24 UTC

[shardingsphere] branch master updated: Remove useless pojo test (#6880)

This is an automated email from the ASF dual-hosted git repository.

panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 834f237  Remove useless pojo test (#6880)
834f237 is described below

commit 834f2377a88cb9a67e2228c32babdbc738c42edf
Author: Liang Zhang <te...@163.com>
AuthorDate: Sun Aug 16 22:49:14 2020 +0800

    Remove useless pojo test (#6880)
---
 .../rule/KeyGenerateStrategyConfigurationTest.java | 34 -----------------
 .../config/rule/TableRuleConfigurationTest.java    | 38 -------------------
 .../ComplexShardingStrategyConfigurationTest.java  | 43 ----------------------
 .../HintShardingStrategyConfigurationTest.java     | 37 -------------------
 .../StandardShardingStrategyConfigurationTest.java | 43 ----------------------
 5 files changed, 195 deletions(-)

diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/rule/KeyGenerateStrategyConfigurationTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/rule/KeyGenerateStrategyConfigurationTest.java
deleted file mode 100644
index dfb5bdc..0000000
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/rule/KeyGenerateStrategyConfigurationTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.sharding.api.config.rule;
-
-import org.apache.shardingsphere.sharding.api.config.strategy.keygen.KeyGenerateStrategyConfiguration;
-import org.junit.Test;
-
-public final class KeyGenerateStrategyConfigurationTest {
-    
-    @Test
-    public void assertConstructorWithoutKeyGenerator() {
-        new KeyGenerateStrategyConfiguration("id", null);
-    }
-    
-    @Test(expected = IllegalArgumentException.class)
-    public void assertConstructorWithoutColumn() {
-        new KeyGenerateStrategyConfiguration("", null);
-    }
-}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/rule/TableRuleConfigurationTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/rule/TableRuleConfigurationTest.java
deleted file mode 100644
index 236dc45..0000000
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/rule/TableRuleConfigurationTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.sharding.api.config.rule;
-
-import org.junit.Test;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public final class TableRuleConfigurationTest {
-    
-    @Test(expected = IllegalArgumentException.class)
-    public void assertConstructorWithoutLogicTable() {
-        new ShardingTableRuleConfiguration("");
-    }
-    
-    @Test
-    public void assertConstructorWithFullArguments() {
-        ShardingTableRuleConfiguration actual = new ShardingTableRuleConfiguration("tbl", "ds_$->{0..15}.tbl_$->{0..15}");
-        assertThat(actual.getLogicTable(), is("tbl"));
-        assertThat(actual.getActualDataNodes(), is("ds_$->{0..15}.tbl_$->{0..15}"));
-    }
-}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/strategy/sharding/ComplexShardingStrategyConfigurationTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/strategy/sharding/ComplexShardingStrategyConfigurationTest.java
deleted file mode 100644
index 80eb3d5..0000000
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/strategy/sharding/ComplexShardingStrategyConfigurationTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.sharding.api.config.strategy.sharding;
-
-import org.junit.Test;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public final class ComplexShardingStrategyConfigurationTest {
-    
-    @Test(expected = IllegalArgumentException.class)
-    public void assertConstructorWithoutShardingColumns() {
-        new ComplexShardingStrategyConfiguration("", "test");
-    }
-    
-    @Test(expected = NullPointerException.class)
-    public void assertConstructorWithoutShardingAlgorithm() {
-        new ComplexShardingStrategyConfiguration("id, creation_date", null);
-    }
-    
-    @Test
-    public void assertConstructorWithFullArguments() {
-        ComplexShardingStrategyConfiguration actual = new ComplexShardingStrategyConfiguration("id, creation_date", "test");
-        assertThat(actual.getShardingColumns(), is("id, creation_date"));
-        assertThat(actual.getShardingAlgorithmName(), is("test"));
-    }
-}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/strategy/sharding/HintShardingStrategyConfigurationTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/strategy/sharding/HintShardingStrategyConfigurationTest.java
deleted file mode 100644
index d15c6ae..0000000
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/strategy/sharding/HintShardingStrategyConfigurationTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.sharding.api.config.strategy.sharding;
-
-import org.junit.Test;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public final class HintShardingStrategyConfigurationTest {
-    
-    @Test(expected = NullPointerException.class)
-    public void assertConstructorWithoutShardingAlgorithm() {
-        new HintShardingStrategyConfiguration(null);
-    }
-    
-    @Test
-    public void assertConstructorWithFullArguments() {
-        HintShardingStrategyConfiguration actual = new HintShardingStrategyConfiguration("test");
-        assertThat(actual.getShardingAlgorithmName(), is("test"));
-    }
-}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/strategy/sharding/StandardShardingStrategyConfigurationTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/strategy/sharding/StandardShardingStrategyConfigurationTest.java
deleted file mode 100644
index a53ea1f..0000000
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/test/java/org/apache/shardingsphere/sharding/api/config/strategy/sharding/StandardShardingStrategyConfigurationTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.sharding.api.config.strategy.sharding;
-
-import org.junit.Test;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public final class StandardShardingStrategyConfigurationTest {
-    
-    @Test(expected = IllegalArgumentException.class)
-    public void assertConstructorWithoutShardingColumn() {
-        new StandardShardingStrategyConfiguration("", "test");
-    }
-    
-    @Test(expected = NullPointerException.class)
-    public void assertConstructorWithoutPreciseShardingAlgorithm() {
-        new StandardShardingStrategyConfiguration("id", null);
-    }
-    
-    @Test
-    public void assertConstructorWithArguments() {
-        StandardShardingStrategyConfiguration actual = new StandardShardingStrategyConfiguration("id", "test");
-        assertThat(actual.getShardingColumn(), is("id"));
-        assertThat(actual.getShardingAlgorithmName(), is("test"));
-    }
-}