This repository was archived by the owner on Mar 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +8
-10
lines changed
main/java/com/owncloud/android/lib/resources/shares
java/com/owncloud/android/lib/resources/shares/responses
responses/com.owncloud.android.lib.resources.sharees.responses Expand file tree Collapse file tree 5 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -164,12 +164,5 @@ class GetRemoteShareesOperation
164
164
// Arguments - constant values
165
165
private const val VALUE_FORMAT = " json"
166
166
private const val VALUE_ITEM_TYPE = " file" // to get the server search for users / groups
167
-
168
- // JSON Node names
169
- const val NODE_VALUE = " value"
170
- const val PROPERTY_LABEL = " label"
171
- const val PROPERTY_SHARE_TYPE = " shareType"
172
- const val PROPERTY_SHARE_WITH = " shareWith"
173
- const val PROPERTY_SHARE_WITH_ADDITIONAL_INFO = " shareWithAdditionalInfo"
174
167
}
175
168
}
Original file line number Diff line number Diff line change @@ -105,7 +105,6 @@ enum class ShareType constructor(val value: Int) {
105
105
FEDERATED (6 );
106
106
107
107
companion object {
108
- private val values = values();
109
- fun fromValue (value : Int ) = values.firstOrNull { it.value == value }
108
+ fun fromValue (value : Int ) = values().firstOrNull { it.value == value }
110
109
}
111
110
}
Original file line number Diff line number Diff line change @@ -51,6 +51,12 @@ class ShareeResponseTest {
51
51
response = loadResponses(EXAMPLE_RESPONSE_JSON , adapter)!!
52
52
}
53
53
54
+ @Test
55
+ fun `check structure - ok - example response files exist` () {
56
+ val file = File (EXAMPLE_RESPONSE_JSON )
57
+ assertTrue(file.exists())
58
+ }
59
+
54
60
@Test
55
61
fun `check structure - ok - contains meta` () {
56
62
assertEquals(" OK" , response.ocs.meta.message!! )
@@ -115,7 +121,7 @@ class ShareeResponseTest {
115
121
116
122
companion object {
117
123
val RESOURCES_PATH =
118
- " /home/schabi/Projects/owncloud-android/owncloud-android-library/owncloudComLibrary/ src/test/resources /com.owncloud.android.lib.resources.sharees.responses"
124
+ " src/test/responses /com.owncloud.android.lib.resources.sharees.responses"
119
125
val EXAMPLE_RESPONSE_JSON = " $RESOURCES_PATH /example_sharee_response.json"
120
126
val EMPTY_RESPONSE_JSON = " $RESOURCES_PATH /empty_sharee_response.json"
121
127
}
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments