This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-283
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-283 by this push:
new ea82720 WIP.
ea82720 is described below
commit ea827207583737cc62d689fd0091c8c800576490
Author: Sergey Kamov <[email protected]>
AuthorDate: Fri Mar 26 14:56:47 2021 +0300
WIP.
---
.../org/apache/nlpcraft/model/dialog/NCDialogSpec2.scala | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec2.scala
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec2.scala
index 0795115..6cf9249 100644
---
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec2.scala
+++
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec2.scala
@@ -125,14 +125,15 @@ class NCDialogSpecModel25 extends NCDialogSpecModel21 {
class NCDialogSpec25 extends NCTestContext {
@Test
def test(): Unit = {
- NCDialogSpecModelFlow2.error = true
- require(getClient.ask("a").isFailed)
+ def test(txt: String, exp: Boolean): Unit = {
+ NCDialogSpecModelFlow2.error = !exp
- NCDialogSpecModelFlow2.error = false
- require(getClient.ask("a").isOk)
+ require(getClient.ask("a").isOk == exp)
+ }
- NCDialogSpecModelFlow2.error = true
- require(getClient.ask("a").isFailed)
+ test(txt = "a", exp = true)
+ test(txt = "a", exp = false)
+ test(txt = "a", exp = true)
}
}