From 7dd5e0a16fc2ba29b0ea466dee0db3043b87e690 Mon Sep 17 00:00:00 2001 From: Fahad Heylaal Date: Tue, 3 Oct 2023 13:55:02 +0200 Subject: [PATCH] test types updated (#7) --- .../kotlin/com/featurevisor/types/Types.kt | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/src/main/kotlin/com/featurevisor/types/Types.kt b/src/main/kotlin/com/featurevisor/types/Types.kt index c641b51..271fa7b 100644 --- a/src/main/kotlin/com/featurevisor/types/Types.kt +++ b/src/main/kotlin/com/featurevisor/types/Types.kt @@ -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, @@ -359,7 +360,7 @@ data class FeatureAssertion( ) data class TestFeature( - val key: FeatureKey, + val feature: FeatureKey, val assertions: Array, ) @@ -370,22 +371,11 @@ data class SegmentAssertion( ) data class TestSegment( - val key: SegmentKey, + val segment: SegmentKey, val assertions: Array, ) -data class Test( - val description: String?, - - // needed for feature testing - val tag: String?, - val environment: EnvironmentKey?, - val features: Array?, - - // needed for segment testing - val segments: Array?, -) - -data class Spec( - val tests: Array, -) +sealed class Test { + data class Feature(val value: TestFeature) : Test() + data class Segment(val value: TestSegment) : Test() +}