Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions FlagsmithClient/src/main/java/com/flagsmith/entities/Flag.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
)
Original file line number Diff line number Diff line change
Expand Up @@ -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"
),
)

Expand Down Expand Up @@ -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)
}
}
}