|
|
@ -1,6 +1,9 @@ |
|
|
|
package com.fanruan.api.util; |
|
|
|
package com.fanruan.api.util; |
|
|
|
|
|
|
|
|
|
|
|
import com.fanruan.api.Prepare; |
|
|
|
import com.fanruan.api.Prepare; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.third.org.apache.poi.hssf.record.formula.functions.Int; |
|
|
|
import org.junit.Assert; |
|
|
|
import org.junit.Assert; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
|
|
|
@ -97,4 +100,15 @@ public class ArrayKitTest extends Prepare { |
|
|
|
Assert.assertEquals(ArrayKit.addAll(longTestArray, 5L,6L), longTestResult); |
|
|
|
Assert.assertEquals(ArrayKit.addAll(longTestArray, 5L,6L), longTestResult); |
|
|
|
Assert.assertEquals(ArrayKit.addAll(shortTestArray, new Short("5"),new Short("6")), shortTestResult); |
|
|
|
Assert.assertEquals(ArrayKit.addAll(shortTestArray, new Short("5"),new Short("6")), shortTestResult); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void toList() throws Exception{ |
|
|
|
|
|
|
|
Integer array[] = {1,2,3}; |
|
|
|
|
|
|
|
ArrayList<Integer> result = new ArrayList<Integer>(); |
|
|
|
|
|
|
|
result.add(1); |
|
|
|
|
|
|
|
result.add(2); |
|
|
|
|
|
|
|
result.add(3); |
|
|
|
|
|
|
|
Assert.assertEquals(ArrayKit.toList(array),result); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|