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

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


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

commit 53b4d910161a96ae479fac922df34f3e6a0ce6a5
Author: Sergey Kamov <[email protected]>
AuthorDate: Thu Mar 31 22:18:41 2022 +0300

    WIP.
---
 .../apache/nlpcraft/internal/impl/NCModelClientSpec3.scala   | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/impl/NCModelClientSpec3.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/impl/NCModelClientSpec3.scala
index 73bc7f0..962399f 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/impl/NCModelClientSpec3.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/impl/NCModelClientSpec3.scala
@@ -47,15 +47,11 @@ class NCModelClientSpec3:
 
         Using.resource(new NCModelClient(mdl)) { client =>
             def ask(): NCCallbackData = client.debugAsk("e1", null, "userId", 
true)
-
-            def execCallbackOk(cb: NCCallbackData): Unit =
-                println(s"Result: 
${cb.getCallback.apply(cb.getCallbackArguments).getBody}")
-
+            def execCallback(cb: NCCallbackData): NCResult = 
cb.getCallback.apply(cb.getCallbackArguments)
+            def execCallbackOk(cb: NCCallbackData): Unit = println(s"Result: 
${execCallback(cb).getBody}")
             def execCallbackFail(cb: NCCallbackData): Unit =
-                try
-                    cb.getCallback.apply(cb.getCallbackArguments)
-                catch
-                    case e: NCException => println(s"Expected error: 
${e.getMessage}")
+                try execCallback(cb)
+                catch case e: NCException => println(s"Expected error: 
${e.getMessage}")
 
             var cbData = ask()
             execCallbackOk(cbData)

Reply via email to