mirror of
https://github.com/alibaba/testable-mock.git
synced 2025-01-27 21:00:15 +08:00
refactor: move fastListOf method out of CollectionTool
This commit is contained in:
parent
0287d27d85
commit
c6e861e5cf
@ -18,7 +18,7 @@ import static com.alibaba.testable.agent.constant.ByteCodeConst.TYPE_CLASS;
|
||||
import static com.alibaba.testable.agent.constant.ConstPool.*;
|
||||
import static com.alibaba.testable.agent.util.MockInvokeUtil.*;
|
||||
import static com.alibaba.testable.core.constant.ConstPool.CONSTRUCTOR;
|
||||
import static com.alibaba.testable.core.tool.CollectionTool.fastListOf;
|
||||
import static com.alibaba.testable.core.util.CollectionUtil.fastListOf;
|
||||
|
||||
/**
|
||||
* @author flin
|
||||
|
@ -3,7 +3,7 @@ package com.alibaba.testable.agent.util;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.objectweb.asm.tree.AnnotationNode;
|
||||
|
||||
import static com.alibaba.testable.core.tool.CollectionTool.fastListOf;
|
||||
import static com.alibaba.testable.core.util.CollectionUtil.fastListOf;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class AnnotationUtilTest {
|
||||
|
@ -41,15 +41,6 @@ public class CollectionTool {
|
||||
return items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an immutable list
|
||||
* @param items elements to add
|
||||
* @return list of the provided items
|
||||
*/
|
||||
public static <T> List<T> fastListOf(T... items) {
|
||||
return Arrays.asList(items);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a mutable list
|
||||
* @param items elements to add
|
||||
|
@ -52,4 +52,13 @@ public class CollectionUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an immutable list
|
||||
* @param items elements to add
|
||||
* @return list of the provided items
|
||||
*/
|
||||
public static <T> List<T> fastListOf(T... items) {
|
||||
return Arrays.asList(items);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package com.alibaba.testable.core.util;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static com.alibaba.testable.core.tool.CollectionTool.fastListOf;
|
||||
import static com.alibaba.testable.core.util.CollectionUtil.fastListOf;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user