This is an automated email from the ASF dual-hosted git repository.

sergeykamov pushed a commit to branch NLPCRAFT-520
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-520 by this push:
     new b9ee6302 WIP.
b9ee6302 is described below

commit b9ee6302f09a2148774fd2212730df764199c1d7
Author: Sergey Kamov <[email protected]>
AuthorDate: Sun Jan 22 11:22:57 2023 +0400

    WIP.
---
 .../nlpcraft/internal/conversation/NCConversationSpec2.scala | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/conversation/NCConversationSpec2.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/conversation/NCConversationSpec2.scala
index 1dc0c64f..77d7f16e 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/conversation/NCConversationSpec2.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/conversation/NCConversationSpec2.scala
@@ -67,7 +67,19 @@ class NCConversationSpec2 extends AnyFunSuite:
                 "Who was the best?" -> Holder("bestBuyerIntent", 
"best_employee", "buy")
             )
 
+            // Checks via requests.
             for ((qry, h) <- questions)
                 require(h == cli.ask(qry, "usrId").getBody)
+
+            // Checks via dry run.
+            for ((qry, h) <- questions)
+                val cb = cli.debugAsk(qry, "usrId", saveHist = true)
+
+                require(h.intentId == cb.getIntentId)
+                require(h.elements.size == cb.getCallbackArguments.size)
+                require(cb.getCallbackArguments.forall(_.size == 1))
+
+                for ((elem, cbArg) <- 
h.elements.toSeq.sorted.zip(cb.getCallbackArguments.map(_.head).sortBy(_.getType)))
+                    require(elem ==  cbArg.getType)
         }
     }

Reply via email to