You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by se...@apache.org on 2020/12/31 14:19:36 UTC
[incubator-nlpcraft] branch master updated: Minor test fixes.
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/master by this push:
new 64c5b59 Minor test fixes.
64c5b59 is described below
commit 64c5b5996e573a9d29932b5de53922c1d89dde22
Author: Sergey Kamov <sk...@gmail.com>
AuthorDate: Thu Dec 31 15:54:05 2020 +0300
Minor test fixes.
---
.../org/apache/nlpcraft/model/dialog/NCDialogSpec.scala | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec.scala b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec.scala
index b37a0d9..244a5f9 100644
--- a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec.scala
+++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec.scala
@@ -55,9 +55,12 @@ class NCDialogSpecModel extends NCModel {
@NCTestEnvironment(model = classOf[NCDialogSpecModel], startClient = true)
class NCDialogSpec extends NCTestContext {
private def f(pairs: (String, String)*): Unit = {
- val cli = getClient
+ def go(): Unit = {
+ val cli = getClient
+
+ cli.clearConversation()
+ cli.clearDialog()
- def go(): Unit =
pairs.zipWithIndex.foreach { case ((txt, intentId), idx) ⇒
val res = cli.ask(txt)
@@ -77,16 +80,10 @@ class NCDialogSpec extends NCTestContext {
)
}
}
+ }
go()
-
- cli.clearConversation()
- cli.clearDialog()
-
go()
-
- cli.clearConversation()
- cli.clearDialog()
}
@Test