Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c6b79a9
init for test
Feb 8, 2018
8c20a6f
conditional for test flag
Feb 8, 2018
73231f5
working test automation
Feb 13, 2018
f22769b
Merge branch 'master' of https://github.com/box/box-java-sdk into jav…
Apr 11, 2018
c9d18df
util function for fetching fixtures
Apr 16, 2018
73319d6
fixture util function
Apr 17, 2018
7f21939
updated collections test
Apr 18, 2018
27cba3c
pt2
Apr 18, 2018
361d2e6
updated collaboration tests to wiremock
Apr 18, 2018
dbac7d5
collaboration test
Apr 19, 2018
a0ca73f
completed comments test - switched to wiremock
Apr 19, 2018
525a52e
switched collaboration whitelisting over to wiremock
Apr 20, 2018
3d22f3d
removed request interceptor test
Apr 20, 2018
74774d5
Box Group Test converted to wiremock
Apr 20, 2018
5759cf2
changed throw to outside function
Apr 21, 2018
c37b5d8
completed converting retention policies manager and trash manager to …
Apr 24, 2018
4ce7469
more tests
Apr 26, 2018
c56649c
Legal Holds Test
Apr 26, 2018
bc2c81c
legal holds assignment test
Apr 26, 2018
9a9dc40
last tests
Apr 28, 2018
35a5d3d
refactored post names
Apr 30, 2018
4a263b7
fixing linting errors
Apr 30, 2018
5d5bdbc
fixing lint errors
Apr 30, 2018
9b7614b
test
Apr 30, 2018
d57e349
test again
Apr 30, 2018
2bf57eb
fixed all lint errors
May 2, 2018
990ad54
updated TestConfig
May 2, 2018
13fdd79
fixed typo
May 2, 2018
da37cdd
fixed minor errors
May 3, 2018
db15a18
Merge branch 'master' into java_test_automation
May 3, 2018
9f552e8
Update BoxFileTest
May 3, 2018
f5e6a0d
Removed unused imports
May 3, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
compile 'org.bouncycastle:bcpkix-jdk15on:1.52'
testCompile 'junit:junit:4.11'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'com.github.tomakehurst:wiremock:2.14.0'
testCompile 'com.github.tomakehurst:wiremock:2.17.0'
testCompile 'org.mockito:mockito-core:1.9.5'
testCompile 'org.slf4j:slf4j-api:1.7.7'
testCompile 'org.slf4j:slf4j-nop:1.7.7'
Expand Down
274 changes: 161 additions & 113 deletions src/main/java/com/box/sdk/BoxFolder.java

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions src/test/Fixtures/BoxCollaboration/CreateCollaboration201.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"type": "collaboration",
"id": "12345",
"created_by": {
"type": "user",
"id": "1111",
"name": "Test User",
"login": "test@user.com"
},
"created_at": "2018-04-18T15:05:29-07:00",
"modified_at": "2018-04-18T15:05:29-07:00",
"expires_at": null,
"status": "accepted",
"accessible_by": {
"type": "user",
"id": "2222",
"name": "Example User",
"login": "example@user.com"
},
"role": "editor",
"acknowledged_at": "2018-04-18T15:05:28-07:00",
"item": {
"type": "folder",
"id": "5678",
"sequence_id": "2",
"etag": "2",
"name": "Ball Valve Diagram"
}
}
35 changes: 35 additions & 0 deletions src/test/Fixtures/BoxCollaboration/CreateFileCollaboration201.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"type": "collaboration",
"id": "12345",
"created_by": {
"type": "user",
"id": "1111",
"name": "Test User",
"login": "example@test.com"
},
"created_at": "2018-04-19T10:43:14-07:00",
"modified_at": "2018-04-19T10:43:14-07:00",
"expires_at": null,
"status": "accepted",
"accessible_by": {
"type": "user",
"id": "2222",
"name": "SDK User",
"login": "sdk@user.com"
},
"role": "editor",
"acknowledged_at": "2018-04-19T10:43:14-07:00",
"item": {
"type": "file",
"id": "3333",
"file_version": {
"type": "file_version",
"id": "4444",
"sha1": "aa810e72823f3c3dad2d1d4488966f6f1e0a8a9d"
},
"sequence_id": "5",
"etag": "5",
"sha1": "aa810e72823f3c3dad2d1d4488966f6f1e0a8a9d",
"name": "1_1-4_bsp_ball_valve.pdf"
}
}
29 changes: 29 additions & 0 deletions src/test/Fixtures/BoxCollaboration/GetCollaborationInfo200.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"type": "collaboration",
"id": "12345",
"created_by": {
"type": "user",
"id": "5678",
"name": "Carl Callahan",
"login": "testuser@example.com"
},
"created_at": "2016-06-06T11:38:58-07:00",
"modified_at": "2016-06-06T11:42:37-07:00",
"expires_at": null,
"status": "accepted",
"accessible_by": {
"type": "user",
"id": "1111",
"name": "Cary Cheng",
"login": "example@test.com"
},
"role": "editor",
"acknowledged_at": "2016-06-06T11:38:58-07:00",
"item": {
"type": "folder",
"id": "2222",
"sequence_id": "2",
"etag": "2",
"name": "Ball Valve Diagram"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"total_count": 2,
"entries": [
{
"type": "collaboration",
"id": "12345",
"created_by": {
"type": "user",
"id": "1111",
"name": "Test User",
"login": "test@user.com"
},
"created_at": "2016-06-06T11:38:58-07:00",
"modified_at": "2016-06-06T11:42:37-07:00",
"expires_at": null,
"status": "accepted",
"accessible_by": {
"type": "user",
"id": "2222",
"name": "Example User",
"login": "example@user.com"
},
"role": "editor",
"acknowledged_at": "2016-06-06T11:38:58-07:00",
"item": {
"type": "folder",
"id": "5678",
"sequence_id": "2",
"etag": "2",
"name": "Ball Valve Diagram"
}
},
{
"type": "collaboration",
"id": "32145",
"created_by": {
"type": "user",
"id": "2222",
"name": "Test User",
"login": "test@user.com"
},
"created_at": "2018-04-18T15:05:29-07:00",
"modified_at": "2018-04-18T15:37:40-07:00",
"expires_at": null,
"status": "accepted",
"accessible_by": {
"type": "user",
"id": "8888",
"name": "SDK User",
"login": "sdk@user.com"
},
"role": "viewer",
"acknowledged_at": "2018-04-18T15:05:28-07:00",
"item": {
"type": "folder",
"id": "5555",
"sequence_id": "2",
"etag": "2",
"name": "Ball Valve Diagram"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"total_count": 1,
"entries": [
{
"type": "collaboration",
"id": "12345",
"created_by": {
"type": "user",
"id": "1111",
"name": "Test User",
"login": "test@user.com"
},
"created_at": "2018-04-18T16:57:50-07:00",
"modified_at": "2018-04-18T17:22:53-07:00",
"expires_at": null,
"status": "pending",
"accessible_by": {
"type": "user",
"id": "2222",
"name": "Example User",
"login": "example@user.com"
},
"role": "editor",
"acknowledged_at": null,
"item": null
}
],
"limit": 100,
"offset": 0
}
29 changes: 29 additions & 0 deletions src/test/Fixtures/BoxCollaboration/UpdateCollaboration200.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"type": "collaboration",
"id": "13261262875",
"created_by": {
"type": "user",
"id": "235699372",
"name": "Cary Cheng",
"login": "ccheng+demo@box.com"
},
"created_at": "2018-04-18T15:05:29-07:00",
"modified_at": "2018-04-18T15:37:40-07:00",
"expires_at": null,
"status": "accepted",
"accessible_by": {
"type": "user",
"id": "244764141",
"name": "Anthony Towns",
"login": "towns@kroger.com"
},
"role": "viewer",
"acknowledged_at": "2018-04-18T15:05:28-07:00",
"item": {
"type": "folder",
"id": "8271532885",
"sequence_id": "2",
"etag": "2",
"name": "Ball Valve Diagram"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "collaboration_whitelist_exempt_target",
"id": "12345",
"user": {
"type": "user",
"id": "1111",
"name": "Test User",
"login": "test@user.com"
},
"enterprise": {
"type": "enterprise",
"id": "2222",
"name": "Box"
},
"created_at": "2018-04-19T15:41:10-07:00",
"modified_at": "2018-04-19T15:41:10-07:00"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "collaboration_whitelist_entry",
"id": "12345",
"domain": "example.com",
"direction": "both",
"enterprise": {
"type": "enterprise",
"id": "1111",
"name": "Example"
},
"created_at": "2018-04-19T14:41:24-07:00",
"modified_at": "2018-04-19T14:41:24-07:00"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "collaboration_whitelist_entry",
"id": "12345",
"domain": "example.com",
"direction": "both",
"enterprise": {
"type": "enterprise",
"id": "1111",
"name": "Example"
},
"created_at": "2018-04-19T14:41:24-07:00",
"modified_at": "2018-04-19T14:41:24-07:00"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "collaboration_whitelist_exempt_target",
"id": "12345",
"user": {
"type": "user",
"id": "1111",
"name": "Test User",
"login": "test@user.com"
},
"enterprise": {
"type": "enterprise",
"id": "2222",
"name": "Example"
},
"created_at": "2018-04-19T15:41:10-07:00",
"modified_at": "2018-04-19T15:41:10-07:00"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"entries": [
{
"type": "collaboration_whitelist_entry",
"id": "1111",
"domain": "test.com",
"direction": "both"
},
{
"type": "collaboration_whitelist_entry",
"id": "2222",
"domain": "example.com",
"direction": "both"
},
{
"type": "collaboration_whitelist_entry",
"id": "3333",
"domain": "user.com",
"direction": "both"
}
],
"limit": 100,
"order": [
{
"by": "id",
"direction": "ASC"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"entries": [
{
"type": "collaboration_whitelist_exempt_target",
"id": "1234",
"user": {
"type": "user",
"id": "1111",
"name": "Test User",
"login": "test@user.com"
}
},
{
"type": "collaboration_whitelist_exempt_target",
"id": "5678",
"user": {
"type": "user",
"id": "2222",
"name": "Example User",
"login": "example@user.com"
}
}
],
"limit": 100,
"order": [
{
"by": "id",
"direction": "ASC"
}
]
}
Loading