Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test types updated #7

Merged
merged 3 commits into from
Oct 3, 2023
Merged
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
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()
}
Loading