Skip to content

Commit

Permalink
test types updated
Browse files Browse the repository at this point in the history
  • Loading branch information
fahad19 committed Oct 2, 2023
1 parent 247afd2 commit 02dd511
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"prettier.enable": false
}
24 changes: 7 additions & 17 deletions src/main/kotlin/com/featurevisor/types/Types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ data class ParsedFeature(
*/
data class FeatureAssertion(
val description: String?,
val environment: EnvironmentKey?,
// bucket weight: 0 to 100
val at: Weight,
val context: Context,
Expand All @@ -359,7 +360,7 @@ data class FeatureAssertion(
)

data class TestFeature(
val key: FeatureKey,
val feature: FeatureKey,
val assertions: Array<FeatureAssertion>,
)

Expand All @@ -370,22 +371,11 @@ data class SegmentAssertion(
)

data class TestSegment(
val key: SegmentKey,
val segment: SegmentKey,
val assertions: Array<SegmentAssertion>,
)

data class Test(
val description: String?,

// needed for feature testing
val tag: String?,
val environment: EnvironmentKey?,
val features: Array<TestFeature>?,

// needed for segment testing
val segments: Array<TestSegment>?,
)

data class Spec(
val tests: Array<Test>,
)
sealed class Test {
data class Feature(val value: TestFeature) : Test()
data class Segment(val value: TestSegment) : Test()
}

0 comments on commit 02dd511

Please sign in to comment.