File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
src/test/java/test/com/qiniu/storage Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ package test .com .qiniu .storage ;
2
+
3
+ import com .qiniu .storage .BucketManager ;
4
+ import org .junit .jupiter .api .Assertions ;
5
+ import org .junit .jupiter .api .Tag ;
6
+ import org .junit .jupiter .api .Test ;
7
+
8
+ public class BucketManagerTest {
9
+ @ Test
10
+ @ Tag ("UnitTest" )
11
+ public void testBatchOperationsSize () {
12
+ BucketManager .BatchOperations batchOperations = new BucketManager .BatchOperations ();
13
+ Assertions .assertEquals (0 , batchOperations .size ());
14
+
15
+ batchOperations .addDeleteOp ("bucket1" , "1" , "2" );
16
+ Assertions .assertEquals (2 , batchOperations .size ());
17
+
18
+ batchOperations .addCopyOp (
19
+ "fromBucket" , "fromFileKey" ,
20
+ "toBucket" , "toFileKey"
21
+ );
22
+ Assertions .assertEquals (3 , batchOperations .size ());
23
+
24
+ batchOperations .addRenameOp ("fromBucket" , "fromFileKey" , "toFileKey" );
25
+ Assertions .assertEquals (4 , batchOperations .size ());
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments