You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by so...@apache.org on 2022/07/29 08:17:21 UTC
[shardingsphere] branch master updated: Remove ResultProcessRuleFixture (#19687)
This is an automated email from the ASF dual-hosted git repository.
soulasuna 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 3764f064be9 Remove ResultProcessRuleFixture (#19687)
3764f064be9 is described below
commit 3764f064be9b983b3966e2cfb12f56618f82093e
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Fri Jul 29 16:17:14 2022 +0800
Remove ResultProcessRuleFixture (#19687)
---
.../engine/ResultProcessEngineFactoryTest.java | 5 ++-
.../merge/fixture/ResultProcessEngineFixture.java | 8 ++---
.../fixture/rule/ResultProcessRuleFixture.java | 36 ----------------------
3 files changed, 6 insertions(+), 43 deletions(-)
diff --git a/shardingsphere-infra/shardingsphere-infra-merge/src/test/java/org/apache/shardingsphere/infra/merge/engine/ResultProcessEngineFactoryTest.java b/shardingsphere-infra/shardingsphere-infra-merge/src/test/java/org/apache/shardingsphere/infra/merge/engine/ResultProcessEngineFactoryTest.java
index 2f89d7ce7cb..cda75ce03e1 100644
--- a/shardingsphere-infra/shardingsphere-infra-merge/src/test/java/org/apache/shardingsphere/infra/merge/engine/ResultProcessEngineFactoryTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-merge/src/test/java/org/apache/shardingsphere/infra/merge/engine/ResultProcessEngineFactoryTest.java
@@ -18,8 +18,8 @@
package org.apache.shardingsphere.infra.merge.engine;
import org.apache.shardingsphere.infra.merge.fixture.ResultProcessEngineFixture;
-import org.apache.shardingsphere.infra.merge.fixture.rule.ResultProcessRuleFixture;
import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
+import org.apache.shardingsphere.test.fixture.rule.MockedRule;
import org.junit.Test;
import java.util.Collections;
@@ -30,14 +30,13 @@ import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.Matchers.hasKey;
import static org.hamcrest.Matchers.hasValue;
import static org.junit.Assert.assertThat;
-import static org.mockito.Mockito.mock;
public final class ResultProcessEngineFactoryTest {
@SuppressWarnings("rawtypes")
@Test
public void assertGetInstances() {
- ResultProcessRuleFixture rule = mock(ResultProcessRuleFixture.class);
+ MockedRule rule = new MockedRule();
Map<ShardingSphereRule, ResultProcessEngine> instances = ResultProcessEngineFactory.getInstances(Collections.singleton(rule));
assertThat(instances.size(), is(1));
assertThat(instances, hasKey(rule));
diff --git a/shardingsphere-infra/shardingsphere-infra-merge/src/test/java/org/apache/shardingsphere/infra/merge/fixture/ResultProcessEngineFixture.java b/shardingsphere-infra/shardingsphere-infra-merge/src/test/java/org/apache/shardingsphere/infra/merge/fixture/ResultProcessEngineFixture.java
index 9a440042fe2..a102d04b7a6 100644
--- a/shardingsphere-infra/shardingsphere-infra-merge/src/test/java/org/apache/shardingsphere/infra/merge/fixture/ResultProcessEngineFixture.java
+++ b/shardingsphere-infra/shardingsphere-infra-merge/src/test/java/org/apache/shardingsphere/infra/merge/fixture/ResultProcessEngineFixture.java
@@ -18,9 +18,9 @@
package org.apache.shardingsphere.infra.merge.fixture;
import org.apache.shardingsphere.infra.merge.engine.ResultProcessEngine;
-import org.apache.shardingsphere.infra.merge.fixture.rule.ResultProcessRuleFixture;
+import org.apache.shardingsphere.test.fixture.rule.MockedRule;
-public final class ResultProcessEngineFixture implements ResultProcessEngine<ResultProcessRuleFixture> {
+public final class ResultProcessEngineFixture implements ResultProcessEngine<MockedRule> {
@Override
public int getOrder() {
@@ -28,7 +28,7 @@ public final class ResultProcessEngineFixture implements ResultProcessEngine<Res
}
@Override
- public Class<ResultProcessRuleFixture> getTypeClass() {
- return ResultProcessRuleFixture.class;
+ public Class<MockedRule> getTypeClass() {
+ return MockedRule.class;
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-merge/src/test/java/org/apache/shardingsphere/infra/merge/fixture/rule/ResultProcessRuleFixture.java b/shardingsphere-infra/shardingsphere-infra-merge/src/test/java/org/apache/shardingsphere/infra/merge/fixture/rule/ResultProcessRuleFixture.java
deleted file mode 100644
index 7405590ca76..00000000000
--- a/shardingsphere-infra/shardingsphere-infra-merge/src/test/java/org/apache/shardingsphere/infra/merge/fixture/rule/ResultProcessRuleFixture.java
+++ /dev/null
@@ -1,36 +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.infra.merge.fixture.rule;
-
-import org.apache.shardingsphere.infra.config.RuleConfiguration;
-import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
-
-import static org.mockito.Mockito.mock;
-
-public final class ResultProcessRuleFixture implements ShardingSphereRule {
-
- @Override
- public RuleConfiguration getConfiguration() {
- return mock(RuleConfiguration.class);
- }
-
- @Override
- public String getType() {
- return ResultProcessRuleFixture.class.getSimpleName();
- }
-}