File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
modelql-client/src/jvmTest/kotlin/org/modelix/modelql/client
commonMain/kotlin/org/modelix/modelql/core
commonTest/kotlin/org/modelix/modelql/core Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ class HtmlBuilderTest {
175
175
}
176
176
}
177
177
}
178
- val expected = """ <html><body><ul><li>null<ul><li>abc<ul><li>model1a<ul></ul></ li><li>model1b<ul></ul> </li></ul></li></ul></li></ul></body></html>"""
178
+ val expected = """ <html><body><ul><li>null<ul><li>abc<ul><li>model1a</ li><li>model1b</li></ul></li></ul></li></ul></body></html>"""
179
179
assertEquals(expected, actual)
180
180
}
181
181
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import kotlinx.serialization.serializer
25
25
26
26
class IsEmptyStep () : AggregationStep<Any?, Boolean>() {
27
27
override suspend fun aggregate (input : StepFlow <Any ?>): IStepOutput <Boolean > {
28
- return input.take(1 ).map { false }.onEmpty { emit(false ) }.single().asStepOutput(this )
28
+ return input.take(1 ).map { false }.onEmpty { emit(true ) }.single().asStepOutput(this )
29
29
}
30
30
31
31
override fun aggregate (input : Sequence <IStepOutput <Any ?>>): IStepOutput <Boolean > = input.none().asStepOutput(this )
Original file line number Diff line number Diff line change @@ -151,6 +151,14 @@ class ModelQLTest {
151
151
assertEquals(" alternative" , result)
152
152
}
153
153
154
+ @Test
155
+ fun testIsEmpty () = runTestWithTimeout {
156
+ val result: Boolean = remoteProductDatabaseQuery { db ->
157
+ db.products.filter { it.id.equalTo(- 1 ) }.isEmpty()
158
+ }
159
+ assertTrue(result)
160
+ }
161
+
154
162
@Test
155
163
fun test2 () = runTestWithTimeout {
156
164
val result: List <String > = remoteProductDatabaseQuery { db ->
You can’t perform that action at this time.
0 commit comments