diff --git a/FlagsmithClient/src/main/java/com/flagsmith/entities/Flag.kt b/FlagsmithClient/src/main/java/com/flagsmith/entities/Flag.kt index 5cb48d8..8d527e5 100644 --- a/FlagsmithClient/src/main/java/com/flagsmith/entities/Flag.kt +++ b/FlagsmithClient/src/main/java/com/flagsmith/entities/Flag.kt @@ -9,11 +9,11 @@ data class Flag( ) data class Feature( - val id: Long, val name: String, - @SerializedName(value = "created_date") val createdDate: String, - val description: String, - @SerializedName(value = "initial_value") val initialValue: String, - @SerializedName(value = "default_enabled") val defaultEnabled: Boolean, - val type: String + val id: Long = 0L, + @SerializedName(value = "created_date") val createdDate: String = "", + val description: String = "", + @SerializedName(value = "initial_value") val initialValue: String = "", + @SerializedName(value = "default_enabled") val defaultEnabled: Boolean = false, + val type: String = "" ) diff --git a/FlagsmithClient/src/test/java/com/flagsmith/FeatureFlagCachingTests.kt b/FlagsmithClient/src/test/java/com/flagsmith/FeatureFlagCachingTests.kt index d96b529..35a0d8a 100644 --- a/FlagsmithClient/src/test/java/com/flagsmith/FeatureFlagCachingTests.kt +++ b/FlagsmithClient/src/test/java/com/flagsmith/FeatureFlagCachingTests.kt @@ -51,26 +51,14 @@ class FeatureFlagCachingTests { setupMocks() val defaultFlags = listOf( Flag( - feature = Feature( - id = 345345L, - name = "Flag 1", - createdDate = "2023‐07‐07T09:07:16Z", - description = "Flag 1 description", - type = "CONFIG", - defaultEnabled = true, - initialValue = "true" - ), enabled = true, featureStateValue = "Vanilla Ice" + feature = Feature(name = "Flag 1"), + enabled = true, + featureStateValue = "Vanilla Ice" ), Flag( - feature = Feature( - id = 34345L, - name = "Flag 2", - createdDate = "2023‐07‐07T09:07:16Z", - description = "Flag 2 description", - type = "CONFIG", - defaultEnabled = true, - initialValue = "true" - ), enabled = true, featureStateValue = "value2" + feature = Feature(name = "Flag 2"), + enabled = true, + featureStateValue = "value2" ), ) @@ -380,4 +368,4 @@ class FeatureFlagCachingTests { await untilTrue(hasFinishedGetRequest) Assert.assertNull("Shouldn't get any data back as we don't have a cache", foundFromCache) } -} \ No newline at end of file +}