add map support

This commit is contained in:
Looly
2022-02-16 13:21:05 +08:00
parent 9ecca7a3c8
commit bac27e87db
7 changed files with 49 additions and 41 deletions

View File

@@ -62,7 +62,10 @@ public class GenericBuilderTest {
Assert.assertEquals(333, box1.getWidth().intValue());
Assert.assertEquals(444, box1.getHeight().intValue());
Assert.assertEquals("TomXin:\"Hello Partner!\"", box1.getTitleAlias());
}
@Test
public void buildMapTest(){
//Map创建
HashMap<String, String> colorMap = GenericBuilder
.of(HashMap<String,String>::new)

View File

@@ -459,4 +459,11 @@ public class ArrayUtilTest {
Assert.assertEquals(3, arrayAfterSplit.length);
Assert.assertEquals(24, arrayAfterSplit[2].length);
}
@Test
public void getTest(){
String[] a = {"a", "b", "c"};
final Object o = ArrayUtil.get(a, -1);
Assert.assertEquals("c", o);
}
}