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

Commit 257494a

Browse files
theScrabiabelgardep
authored andcommitted
apply suggested changes
delete unused const values bla
1 parent 6ec1bd2 commit 257494a

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/shares/GetRemoteShareesOperation.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,5 @@ class GetRemoteShareesOperation
164164
// Arguments - constant values
165165
private const val VALUE_FORMAT = "json"
166166
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"
174167
}
175168
}

owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/shares/RemoteShare.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ enum class ShareType constructor(val value: Int) {
105105
FEDERATED(6);
106106

107107
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 }
110109
}
111110
}

owncloudComLibrary/src/test/java/com/owncloud/android/lib/resources/shares/responses/ShareeResponseTest.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ class ShareeResponseTest {
5151
response = loadResponses(EXAMPLE_RESPONSE_JSON, adapter)!!
5252
}
5353

54+
@Test
55+
fun `check structure - ok - example response files exist`() {
56+
val file = File(EXAMPLE_RESPONSE_JSON)
57+
assertTrue(file.exists())
58+
}
59+
5460
@Test
5561
fun `check structure - ok - contains meta`() {
5662
assertEquals("OK", response.ocs.meta.message!!)
@@ -115,7 +121,7 @@ class ShareeResponseTest {
115121

116122
companion object {
117123
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"
119125
val EXAMPLE_RESPONSE_JSON = "$RESOURCES_PATH/example_sharee_response.json"
120126
val EMPTY_RESPONSE_JSON = "$RESOURCES_PATH/empty_sharee_response.json"
121127
}

0 commit comments

Comments
 (0)