You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/12/11 13:31:27 UTC
[GitHub] [shardingsphere] lushaorong opened a new pull request, #22808: shardingsphere-22759 Implement new data masking feature for users wit…
lushaorong opened a new pull request, #22808:
URL: https://github.com/apache/shardingsphere/pull/22808
…h security needs
Signed-off-by: lushaorong <ww...@163.com>
Fixes #22759.
Changes proposed in this pull request:
- add MASK_FIRST_N_LAST_M mask algorithm
- add MASK_FROM_X_TO_Y mask algorithm
---
Before committing this PR, I'm sure that I have checked the following options:
- [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [ ] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added corresponding unit tests for my changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu merged pull request #22808: Implement MASK_FIRST_N_LAST_M and MASK_FROM_X_TO_Y
Posted by GitBox <gi...@apache.org>.
strongduanmu merged PR #22808:
URL: https://github.com/apache/shardingsphere/pull/22808
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] codecov-commenter commented on pull request #22808: Implement MASK_FIRST_N_LAST_M and MASK_FROM_X_TO_Y
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #22808:
URL: https://github.com/apache/shardingsphere/pull/22808#issuecomment-1345562650
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/22808?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#22808](https://codecov.io/gh/apache/shardingsphere/pull/22808?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e38b4b1) into [master](https://codecov.io/gh/apache/shardingsphere/commit/dd82a4b79d13c5de84aac328ea7344ac9780294e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dd82a4b) will **increase** coverage by `0.02%`.
> The diff coverage is `28.78%`.
> :exclamation: Current head e38b4b1 differs from pull request most recent head 3348605. Consider uploading reports for the commit 3348605 to get more accurate results
```diff
@@ Coverage Diff @@
## master #22808 +/- ##
============================================
+ Coverage 49.31% 49.33% +0.02%
Complexity 2447 2447
============================================
Files 4128 4128
Lines 57736 57772 +36
Branches 9889 9897 +8
============================================
+ Hits 28471 28502 +31
- Misses 26812 26813 +1
- Partials 2453 2457 +4
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/22808?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ardingsphere/agent/api/MethodInvocationResult.java](https://codecov.io/gh/apache/shardingsphere/pull/22808/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWdlbnQvYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9hZ2VudC9hcGkvTWV0aG9kSW52b2NhdGlvblJlc3VsdC5qYXZh) | `0.00% <ø> (ø)` | |
| [...dingsphere/agent/api/pointcut/PluginPointcuts.java](https://codecov.io/gh/apache/shardingsphere/pull/22808/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWdlbnQvYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9hZ2VudC9hcGkvcG9pbnRjdXQvUGx1Z2luUG9pbnRjdXRzLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...tebuddy/transformer/ShardingSphereTransformer.java](https://codecov.io/gh/apache/shardingsphere/pull/22808/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9ieXRlYnVkZHkvdHJhbnNmb3JtZXIvU2hhcmRpbmdTcGhlcmVUcmFuc2Zvcm1lci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...y/transformer/advice/ComposeConstructorAdvice.java](https://codecov.io/gh/apache/shardingsphere/pull/22808/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9ieXRlYnVkZHkvdHJhbnNmb3JtZXIvYWR2aWNlL0NvbXBvc2VDb25zdHJ1Y3RvckFkdmljZS5qYXZh) | `0.00% <ø> (ø)` | |
| [...rmer/advice/ComposeInstanceMethodAroundAdvice.java](https://codecov.io/gh/apache/shardingsphere/pull/22808/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9ieXRlYnVkZHkvdHJhbnNmb3JtZXIvYWR2aWNlL0NvbXBvc2VJbnN0YW5jZU1ldGhvZEFyb3VuZEFkdmljZS5qYXZh) | `0.00% <ø> (ø)` | |
| [...former/advice/ComposeStaticMethodAroundAdvice.java](https://codecov.io/gh/apache/shardingsphere/pull/22808/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9ieXRlYnVkZHkvdHJhbnNmb3JtZXIvYWR2aWNlL0NvbXBvc2VTdGF0aWNNZXRob2RBcm91bmRBZHZpY2UuamF2YQ==) | `0.00% <ø> (ø)` | |
| [...config/validator/PluginConfigurationValidator.java](https://codecov.io/gh/apache/shardingsphere/pull/22808/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9jb25maWcvdmFsaWRhdG9yL1BsdWdpbkNvbmZpZ3VyYXRpb25WYWxpZGF0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...re/definition/AbstractPluginDefinitionService.java](https://codecov.io/gh/apache/shardingsphere/pull/22808/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9kZWZpbml0aW9uL0Fic3RyYWN0UGx1Z2luRGVmaW5pdGlvblNlcnZpY2UuamF2YQ==) | `0.00% <ø> (ø)` | |
| [...gent/core/definition/InterceptorPointRegistry.java](https://codecov.io/gh/apache/shardingsphere/pull/22808/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9kZWZpbml0aW9uL0ludGVyY2VwdG9yUG9pbnRSZWdpc3RyeS5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...sphere/agent/core/plugin/AdviceInstanceLoader.java](https://codecov.io/gh/apache/shardingsphere/pull/22808/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9wbHVnaW4vQWR2aWNlSW5zdGFuY2VMb2FkZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| ... and [56 more](https://codecov.io/gh/apache/shardingsphere/pull/22808/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #22808: Implement MASK_FIRST_N_LAST_M and MASK_FROM_X_TO_Y
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on code in PR #22808:
URL: https://github.com/apache/shardingsphere/pull/22808#discussion_r1045426527
##########
features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/MaskFirstNLastMMaskAlgorithm.java:
##########
@@ -0,0 +1,90 @@
+/*
+ * 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.mask.algorithm.cover;
+
+import com.google.common.base.Preconditions;
+import lombok.Getter;
+import org.apache.shardingsphere.mask.spi.MaskAlgorithm;
+
+import java.util.Properties;
+
+/**
+ * MASK_FIRST_N_LAST_M.
Review Comment:
Please modify java doc to `Mask first n last m mask algorithm`.
##########
features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/MaskFromXToYMaskAlgorithm.java:
##########
@@ -0,0 +1,87 @@
+/*
+ * 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.mask.algorithm.cover;
+
+import com.google.common.base.Preconditions;
+import lombok.Getter;
+import org.apache.shardingsphere.mask.spi.MaskAlgorithm;
+
+import java.util.Properties;
+
+/**
Review Comment:
Please modify javadoc to `Mask from x to y mask algorithm`.
##########
features/mask/core/src/test/java/org/apache/shardingsphere/mask/algorithm/cover/MaskFirstNLastMMaskAlgorithmTest.java:
##########
@@ -0,0 +1,70 @@
+/*
+ * 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.mask.algorithm.cover;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
+ * MASK_FIRST_N_LAST_M.
+ */
+public final class MaskFirstNLastMMaskAlgorithmTest {
+
+ private MaskFirstNLastMMaskAlgorithm algorithm;
+
+ @Before
+ public void setUp() {
+ algorithm = new MaskFirstNLastMMaskAlgorithm();
+ algorithm.init(createProperties());
+ }
+
+ private Properties createProperties() {
+ Properties props = new Properties();
+ props.setProperty("n", "3");
+ props.setProperty("m", "5");
+ props.setProperty("replace-char", "*");
+ return props;
+ }
+
+ @Test
+ public void assertMask() {
+ assertThat(algorithm.mask("abc12345678"), is("***123*****"));
+ }
+
+ @Test
+ public void assertMaskWithShortPlainValue() {
+ assertThat(algorithm.mask("ab"), is("**"));
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void assertMaskWithInvalidProperties() {
+ algorithm.init(createInvalidProperties());
+ }
+
+ private Properties createInvalidProperties() {
+ Properties props = new Properties();
+ props.setProperty("m", "5");
+ props.setProperty("replace-char", "*");
+ return props;
Review Comment:
Please use result instead of props.
##########
features/mask/core/src/test/java/org/apache/shardingsphere/mask/algorithm/cover/MaskFromXToYMaskAlgorithmTest.java:
##########
@@ -0,0 +1,71 @@
+/*
+ * 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.mask.algorithm.cover;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
Review Comment:
Please remove javadoc in unit test.
##########
features/mask/core/src/test/java/org/apache/shardingsphere/mask/algorithm/cover/MaskFirstNLastMMaskAlgorithmTest.java:
##########
@@ -0,0 +1,70 @@
+/*
+ * 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.mask.algorithm.cover;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
+ * MASK_FIRST_N_LAST_M.
+ */
+public final class MaskFirstNLastMMaskAlgorithmTest {
+
+ private MaskFirstNLastMMaskAlgorithm algorithm;
+
+ @Before
+ public void setUp() {
+ algorithm = new MaskFirstNLastMMaskAlgorithm();
+ algorithm.init(createProperties());
+ }
+
+ private Properties createProperties() {
+ Properties props = new Properties();
+ props.setProperty("n", "3");
+ props.setProperty("m", "5");
+ props.setProperty("replace-char", "*");
+ return props;
Review Comment:
Please use result instead of props.
##########
features/mask/core/src/test/java/org/apache/shardingsphere/mask/algorithm/cover/MaskFirstNLastMMaskAlgorithmTest.java:
##########
@@ -0,0 +1,70 @@
+/*
+ * 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.mask.algorithm.cover;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
Review Comment:
Please remove javadoc in unit test.
##########
features/mask/core/src/test/java/org/apache/shardingsphere/mask/algorithm/cover/MaskFromXToYMaskAlgorithmTest.java:
##########
@@ -0,0 +1,71 @@
+/*
+ * 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.mask.algorithm.cover;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
+ * MASK_FROM_X_TO_Y.
+ */
+public final class MaskFromXToYMaskAlgorithmTest {
+
+ private MaskFromXToYMaskAlgorithm algorithm;
+
+ @Before
+ public void setUp() {
+ algorithm = new MaskFromXToYMaskAlgorithm();
+ algorithm.init(createProperties());
+ }
+
+ private Properties createProperties() {
+ Properties props = new Properties();
+ props.setProperty("x", "3");
+ props.setProperty("y", "5");
+ props.setProperty("replace-char", "*");
+ return props;
+ }
+
+ @Test
+ public void assertMask() {
+ assertThat(algorithm.mask("abc12345"), is("abc***45"));
+ }
+
+ @Test
+ public void assertMaskWithShortPlainValue() {
+ assertThat(algorithm.mask("ab"), is("ab"));
+ assertThat(algorithm.mask("abc1"), is("abc*"));
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void assertMaskWithInvalidProperties() {
+ algorithm.init(createInvalidProperties());
+ }
+
+ private Properties createInvalidProperties() {
+ Properties props = new Properties();
+ props.setProperty("x", "5");
+ props.setProperty("replace-char", "*");
+ return props;
Review Comment:
Please use result instead of props.
##########
features/mask/core/src/test/java/org/apache/shardingsphere/mask/algorithm/cover/MaskFromXToYMaskAlgorithmTest.java:
##########
@@ -0,0 +1,71 @@
+/*
+ * 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.mask.algorithm.cover;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
+ * MASK_FROM_X_TO_Y.
+ */
+public final class MaskFromXToYMaskAlgorithmTest {
+
+ private MaskFromXToYMaskAlgorithm algorithm;
+
+ @Before
+ public void setUp() {
+ algorithm = new MaskFromXToYMaskAlgorithm();
+ algorithm.init(createProperties());
+ }
+
+ private Properties createProperties() {
+ Properties props = new Properties();
+ props.setProperty("x", "3");
+ props.setProperty("y", "5");
+ props.setProperty("replace-char", "*");
+ return props;
Review Comment:
Please use result instead of props.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org