You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ch...@apache.org on 2024/07/25 10:10:48 UTC
(shardingsphere) branch master updated: Remove useless mock on EncryptProjectionTokenGeneratorTest (#32264)
This is an automated email from the ASF dual-hosted git repository.
chengzhang 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 eba87738321 Remove useless mock on EncryptProjectionTokenGeneratorTest (#32264)
eba87738321 is described below
commit eba877383219abbd2eaf15402744c7426a0bf27a
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Thu Jul 25 18:10:41 2024 +0800
Remove useless mock on EncryptProjectionTokenGeneratorTest (#32264)
---
.../rewrite/token/generator/EncryptProjectionTokenGeneratorTest.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptProjectionTokenGeneratorTest.java b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptProjectionTokenGeneratorTest.java
index a19b26b2d4a..f8323a9535a 100644
--- a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptProjectionTokenGeneratorTest.java
+++ b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptProjectionTokenGeneratorTest.java
@@ -18,9 +18,8 @@
package org.apache.shardingsphere.encrypt.rewrite.token.generator;
import org.apache.shardingsphere.encrypt.rule.EncryptRule;
-import org.apache.shardingsphere.encrypt.rule.table.EncryptTable;
import org.apache.shardingsphere.encrypt.rule.column.EncryptColumn;
-import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
+import org.apache.shardingsphere.encrypt.rule.table.EncryptTable;
import org.apache.shardingsphere.infra.binder.context.segment.select.projection.impl.ColumnProjection;
import org.apache.shardingsphere.infra.binder.context.segment.table.TablesContext;
import org.apache.shardingsphere.infra.binder.context.statement.dml.SelectStatementContext;
@@ -84,7 +83,6 @@ class EncryptProjectionTokenGeneratorTest {
when(encryptTable1.getEncryptColumn("mobile")).thenReturn(encryptColumn);
when(result.findEncryptTable("t_order").isPresent()).thenReturn(true);
when(result.getEncryptTable("t_order").isEncryptColumn("order_id")).thenReturn(true);
- when(result.getEncryptTable("t_order").getEncryptColumn("order_id").getCipher().getEncryptor()).thenReturn(mock(EncryptAlgorithm.class));
return result;
}