This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 3d437a7d8e0 Add test cases of EncryptTable's isEncryptColumn and
getEncryptColumn… (#28412)
3d437a7d8e0 is described below
commit 3d437a7d8e0b2e2194be58a7968b9fb41ae4a0d8
Author: Gaoxiang Xiong <[email protected]>
AuthorDate: Tue Sep 12 17:14:49 2023 +0800
Add test cases of EncryptTable's isEncryptColumn and getEncryptColumn…
(#28412)
* Add test cases of EncryptTable's isEncryptColumn and getEncryptColumn
methods
* fix checkStyle
---
.../apache/shardingsphere/encrypt/rule/EncryptTableTest.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git
a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptTableTest.java
b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptTableTest.java
index c46285fd4a5..b12f434351b 100644
---
a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptTableTest.java
+++
b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptTableTest.java
@@ -73,11 +73,21 @@ class EncryptTableTest {
assertFalse(encryptTable.isCipherColumn("logicColumn"));
}
+ @Test
+ void assertIsEncryptColumn() {
+ assertTrue(encryptTable.isEncryptColumn("logicColumn"));
+ }
+
@Test
void assertGetLogicColumnByCipherColumn() {
assertNotNull(encryptTable.getLogicColumnByCipherColumn("cipherColumn"));
}
+ @Test
+ void assertGetEncryptColumn() {
+ assertNotNull(encryptTable.getEncryptColumn("logicColumn"));
+ }
+
@Test
void assertGetLogicColumnByCipherColumnWhenNotFind() {
assertThrows(EncryptLogicColumnNotFoundException.class, () ->
encryptTable.getLogicColumnByCipherColumn("invalidColumn"));