Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tyiuhc committed Oct 29, 2024
1 parent 33d9780 commit 4299855
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions evaluation-core/src/commonTest/kotlin/PartialEvaluationTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ class PartialEvaluationTest {
)
DefaultAsserter.assertEquals(
"Unexpected evaluation result",
emptyList<String>(),
partialEvaluatedSegment.conditions?.get(0)?.get(0)?.selector
EvaluationCondition(
listOf(),
EvaluationOperator.IS,
setOf("(none)")
),
partialEvaluatedSegment.conditions?.get(0)?.get(0)
)

// if both props exist, but either condition DOES NOT match, the condition should be ALWAYS-FALSE
Expand All @@ -65,8 +69,12 @@ class PartialEvaluationTest {
)
DefaultAsserter.assertEquals(
"Unexpected evaluation result",
emptyList<String>(),
partialEvaluatedSegment.conditions?.get(0)?.get(0)?.selector
EvaluationCondition(
listOf(),
EvaluationOperator.IS_NOT,
setOf("(none)")
),
partialEvaluatedSegment.conditions?.get(0)?.get(0)
)

// test bucketing translations
Expand Down Expand Up @@ -173,7 +181,7 @@ class PartialEvaluationTest {

@Test
fun `test partial evaluate bucketing`() {
// bucketing unit exists remotely BUT NOT locally
// bucketing unit (user_id) exists remotely BUT NOT locally
var remoteUser = userContext(userId = "user_id")
var partialEvaluatedFlags = partialEvaluationEngine.partialEvaluate(
remoteUser,
Expand Down

0 comments on commit 4299855

Please sign in to comment.