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

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


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

commit 15820b5d330d4c9589663d453e8bff4334c37530
Author: Sergey Kamov <[email protected]>
AuthorDate: Tue Sep 22 15:49:44 2020 +0300

    WIP.
---
 .../{NCTimeoutSpec.scala => NCConversationTimeoutSpec.scala}  | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCTimeoutSpec.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCConversationTimeoutSpec.scala
similarity index 93%
rename from 
nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCTimeoutSpec.scala
rename to 
nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCConversationTimeoutSpec.scala
index 2885567..2cafd33 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCTimeoutSpec.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCConversationTimeoutSpec.scala
@@ -68,15 +68,12 @@ class NCTimeoutSpecModel extends NCModel {
                 saveData = conv.getData
             case 1 ⇒
                 assertFalse(conv.getData.isEmpty)
-                assertFalse(saveData.isEmpty)
-
+                assertEquals(saveData, conv.getData)
+                assertEquals("value", conv.getData.getOrDefault("key", "-"))
                 assertFalse(conv.getDialogFlow.isEmpty)
-
-                assertTrue(conv.getData.containsKey("key"))
             case 2 ⇒
                 assertTrue(conv.getData.isEmpty)
                 assertTrue(saveData.isEmpty)
-
                 assertTrue(conv.getDialogFlow.isEmpty)
             case 3 ⇒
                 assertTrue(conv.getData.isEmpty)
@@ -85,7 +82,7 @@ class NCTimeoutSpecModel extends NCModel {
             case _ ⇒ require(false)
         }
 
-        val msg = s"OK-$step"
+        val msg = s"Step-$step"
 
         step = step + 1
 
@@ -97,7 +94,7 @@ class NCTimeoutSpecModel extends NCModel {
   * @see NCTimeoutSpecModel
   */
 @NCTestEnvironment(model = classOf[NCTimeoutSpecModel], startClient = true)
-class NCTimeoutSpec extends NCTestContext {
+class NCConversationTimeoutSpec extends NCTestContext {
     @Test
     @throws[NCException]
     @throws[IOException]

Reply via email to