Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 0984aed

Browse files
committed
bump versions of used libs
1 parent 20c688f commit 0984aed

2 files changed

Lines changed: 42 additions & 43 deletions

File tree

build.gradle

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,16 @@ configurations {
9191

9292
dependencies {
9393
compile group: 'com.mashape.unirest', name: 'unirest-java', version:'1.4.9'
94-
compile group: 'org.apache.httpcomponents', name: 'httpclient', version:'4.5.3'
94+
compile group: 'org.apache.httpcomponents', name: 'httpclient', version:'4.5.9'
9595
compile group: 'org.json', name: 'json', version:'20160810'
96-
compile group: 'com.google.code.gson', name: 'gson', version:'2.8.0'
96+
compile group: 'com.google.code.gson', name: 'gson', version:'2.8.5'
9797
compile group: 'commons-beanutils', name: 'commons-beanutils', version:'1.9.3'
98-
compile group: 'commons-io', name: 'commons-io', version:'2.5'
99-
compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.25'
98+
compile group: 'commons-io', name: 'commons-io', version:'2.6'
99+
compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.26'
100100

101101
testCompile group: 'junit', name: 'junit', version:'4.12'
102-
testCompile group: 'commons-io', name: 'commons-io', version:'2.5'
103-
testCompile group: 'com.github.tomakehurst', name: 'wiremock', version:'2.8.0'
104-
testCompile group: 'org.slf4j', name: 'slf4j-jdk14', version:'1.7.25'
102+
testCompile group: 'com.github.tomakehurst', name: 'wiremock', version:'2.23.2'
103+
testCompile group: 'org.slf4j', name: 'slf4j-jdk14', version:'1.7.26'
105104

106105
codacy group: 'com.codacy', name: 'codacy-coverage-reporter', version: '1.0.13'
107106
}

src/test/java/com/sybit/airtable/CustomObjectMapperTest.java

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
import com.sybit.airtable.vo.Attachment;
1313
import com.sybit.airtable.vo.Thumbnail;
1414
import java.util.ArrayList;
15+
import java.util.HashMap;
1516
import java.util.List;
1617
import java.util.Map;
17-
import org.apache.commons.collections4.map.HashedMap;
1818
import static org.junit.Assert.assertEquals;
1919
import static org.junit.Assert.assertNotNull;
2020
import org.junit.Before;
@@ -25,94 +25,94 @@
2525
* @author fzr
2626
*/
2727
public class CustomObjectMapperTest {
28-
28+
2929
private ListConverter listConverter;
3030
private MapConverter mapConverter;
31-
31+
3232
@Before
3333
public void before(){
34-
34+
3535
this.listConverter = new ListConverter();
3636
this.mapConverter = new MapConverter();
37-
37+
3838
}
39-
39+
4040
@Test
4141
public void listClassTest(){
42-
42+
4343
listConverter.setListClass(Attachment.class);
44-
assertEquals(listConverter.getListClass(),Attachment.class);
44+
assertEquals(listConverter.getListClass(),Attachment.class);
4545
}
46-
47-
@Test
46+
47+
@Test
4848
public void mapClassTest(){
49-
49+
5050
mapConverter.setMapClass(Thumbnail.class);
5151
assertEquals(mapConverter.getMapClass(),Thumbnail.class);
5252
}
53-
53+
5454
@Test
5555
public void convertListTest(){
56-
56+
5757
listConverter.setListClass(Attachment.class);
58-
58+
5959
Class type = List.class;
6060
List value = new ArrayList();
61-
61+
6262
LinkedTreeMap ltm = new LinkedTreeMap();
6363
ltm.put("id","id0001");
6464
ltm.put("url","http://test.com");
6565
ltm.put("filename","filename.txt");
6666
ltm.put("size","10");
6767
ltm.put("type","image/jpeg");
68-
69-
Map<String,Thumbnail> thumbnails = new HashedMap<>();
68+
69+
Map<String,Thumbnail> thumbnails = new HashMap<>();
7070
Thumbnail tmb = new Thumbnail();
71-
71+
7272
tmb.setName("Thumbnail");
7373
tmb.setUrl("http:example.com");
7474
tmb.setWidth(Float.valueOf(10));
7575
tmb.setHeight(Float.valueOf(10));
76-
76+
7777
thumbnails.put("small", tmb);
78-
78+
7979
ltm.put("thumbnails",thumbnails);
80-
80+
8181
value.add(0, ltm);
82-
82+
8383
List<Attachment> list = (List<Attachment>) listConverter.convert(type, value);
8484
assertNotNull(list);
8585
assertNotNull(list.get(0).getId());
8686
assertNotNull(list.get(0).getFilename());
8787
assertNotNull(list.get(0).getSize());
8888
assertNotNull(list.get(0).getType());
8989
assertNotNull(list.get(0).getUrl());
90-
assertNotNull(list.get(0).getThumbnails());
91-
90+
assertNotNull(list.get(0).getThumbnails());
91+
9292
}
93-
93+
9494
@Test
9595
public void convertMapTest(){
96-
96+
9797
mapConverter.setMapClass(Thumbnail.class);
98-
98+
9999
Class type = Map.class;
100-
100+
101101
LinkedTreeMap<String, Object> value = new LinkedTreeMap<>();
102102
LinkedTreeMap<String, Object> innerMap = new LinkedTreeMap<>();
103-
103+
104104
innerMap.put("url","http://example.com");
105-
value.put("small",innerMap);
106-
107-
105+
value.put("small",innerMap);
106+
107+
108108
Map<String,Thumbnail> thumb = (Map<String,Thumbnail>) mapConverter.convert(type,value);
109109
System.out.println(thumb);
110110
assertNotNull(thumb);
111111
assertNotNull(thumb.get("small"));
112112
assertNotNull(thumb.get("small").getUrl());
113-
114-
115-
113+
114+
115+
116116
}
117-
117+
118118
}

0 commit comments

Comments
 (0)