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

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


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

commit fcc90a0a6968e0b0900e34c59fd9f66cbc7a9612
Author: Sergey Kamov <[email protected]>
AuthorDate: Fri Apr 23 19:46:00 2021 +0300

    WIP.
---
 .../alarm/{src/main/resources => }/README.md            |  0
 ...pleModelsSpec.scala => NCModelsValidationSpec.scala} |  4 ++--
 .../echo/{src/main/resources => }/README.md             |  0
 ...pleModelsSpec.scala => NCModelsValidationSpec.scala} |  4 ++--
 .../helloworld/{src/main/resources => }/README.md       |  0
 ...pleModelsSpec.scala => NCModelsValidationSpec.scala} |  4 ++--
 .../lightswitch/{src/main/resources => }/README.md      |  0
 ...pleModelsSpec.scala => NCModelsValidationSpec.scala} |  4 ++--
 ...pleModelsSpec.scala => NCModelsValidationSpec.scala} |  5 +++--
 .../phone/{src/main/resources => }/README.md            |  0
 .../sql/{src/main/resources => }/README.md              |  0
 .../nlpcraft/examples/sql/NCModelsValidationSpec.scala} | 17 ++++++++++++-----
 .../time/{src/main/resources => }/README.md             |  0
 ...pleModelsSpec.scala => NCModelsValidationSpec.scala} |  4 ++--
 .../weather/{src/main/resources => }/README.md          |  0
 ...pleModelsSpec.scala => NCModelsValidationSpec.scala} |  4 ++--
 16 files changed, 27 insertions(+), 19 deletions(-)

diff --git a/nlpcraft-examples/alarm/src/main/resources/README.md 
b/nlpcraft-examples/alarm/README.md
similarity index 100%
rename from nlpcraft-examples/alarm/src/main/resources/README.md
rename to nlpcraft-examples/alarm/README.md
diff --git 
a/nlpcraft-examples/alarm/src/test/java/org/apache/nlpcraft/examples/alarm/NCTestExampleModelsSpec.scala
 
b/nlpcraft-examples/alarm/src/test/java/org/apache/nlpcraft/examples/alarm/NCModelsValidationSpec.scala
similarity index 94%
rename from 
nlpcraft-examples/alarm/src/test/java/org/apache/nlpcraft/examples/alarm/NCTestExampleModelsSpec.scala
rename to 
nlpcraft-examples/alarm/src/test/java/org/apache/nlpcraft/examples/alarm/NCModelsValidationSpec.scala
index b942742..6544708 100644
--- 
a/nlpcraft-examples/alarm/src/test/java/org/apache/nlpcraft/examples/alarm/NCTestExampleModelsSpec.scala
+++ 
b/nlpcraft-examples/alarm/src/test/java/org/apache/nlpcraft/examples/alarm/NCModelsValidationSpec.scala
@@ -21,9 +21,9 @@ import 
org.apache.nlpcraft.model.tools.test.NCTestAutoModelValidator
 import org.junit.jupiter.api.{Assertions, Test}
 
 /**
-  * JUnit example models validation.
+  * JUnit model validation.
   */
-class NCTestExampleModelsSpec {
+class NCModelsValidationSpec {
     @Test
     def test(): Unit = {
         // Instruct auto-validator what models to test.
diff --git a/nlpcraft-examples/echo/src/main/resources/README.md 
b/nlpcraft-examples/echo/README.md
similarity index 100%
rename from nlpcraft-examples/echo/src/main/resources/README.md
rename to nlpcraft-examples/echo/README.md
diff --git 
a/nlpcraft-examples/echo/src/test/java/org/apache/nlpcraft/examples/echo/NCTestExampleModelsSpec.scala
 
b/nlpcraft-examples/echo/src/test/java/org/apache/nlpcraft/examples/echo/NCModelsValidationSpec.scala
similarity index 94%
rename from 
nlpcraft-examples/echo/src/test/java/org/apache/nlpcraft/examples/echo/NCTestExampleModelsSpec.scala
rename to 
nlpcraft-examples/echo/src/test/java/org/apache/nlpcraft/examples/echo/NCModelsValidationSpec.scala
index 7805be9..0da3950 100644
--- 
a/nlpcraft-examples/echo/src/test/java/org/apache/nlpcraft/examples/echo/NCTestExampleModelsSpec.scala
+++ 
b/nlpcraft-examples/echo/src/test/java/org/apache/nlpcraft/examples/echo/NCModelsValidationSpec.scala
@@ -21,9 +21,9 @@ import 
org.apache.nlpcraft.model.tools.test.NCTestAutoModelValidator
 import org.junit.jupiter.api.{Assertions, Test}
 
 /**
-  * JUnit example models validation.
+  * JUnit model validation.
   */
-class NCTestExampleModelsSpec {
+class NCModelsValidationSpec {
     @Test
     def test(): Unit = {
         // Instruct auto-validator what models to test.
diff --git a/nlpcraft-examples/helloworld/src/main/resources/README.md 
b/nlpcraft-examples/helloworld/README.md
similarity index 100%
rename from nlpcraft-examples/helloworld/src/main/resources/README.md
rename to nlpcraft-examples/helloworld/README.md
diff --git 
a/nlpcraft-examples/helloworld/src/test/java/org/apache/nlpcraft/examples/helloworld/NCTestExampleModelsSpec.scala
 
b/nlpcraft-examples/helloworld/src/test/java/org/apache/nlpcraft/examples/helloworld/NCModelsValidationSpec.scala
similarity index 95%
rename from 
nlpcraft-examples/helloworld/src/test/java/org/apache/nlpcraft/examples/helloworld/NCTestExampleModelsSpec.scala
rename to 
nlpcraft-examples/helloworld/src/test/java/org/apache/nlpcraft/examples/helloworld/NCModelsValidationSpec.scala
index e7c561f..36bc023 100644
--- 
a/nlpcraft-examples/helloworld/src/test/java/org/apache/nlpcraft/examples/helloworld/NCTestExampleModelsSpec.scala
+++ 
b/nlpcraft-examples/helloworld/src/test/java/org/apache/nlpcraft/examples/helloworld/NCModelsValidationSpec.scala
@@ -21,9 +21,9 @@ import 
org.apache.nlpcraft.model.tools.test.NCTestAutoModelValidator
 import org.junit.jupiter.api.{Assertions, Test}
 
 /**
-  * JUnit example models validation.
+  * JUnit model validation.
   */
-class NCTestExampleModelsSpec {
+class NCModelsValidationSpec {
     @Test
     def test(): Unit = {
         // Instruct auto-validator what models to test.
diff --git a/nlpcraft-examples/lightswitch/src/main/resources/README.md 
b/nlpcraft-examples/lightswitch/README.md
similarity index 100%
rename from nlpcraft-examples/lightswitch/src/main/resources/README.md
rename to nlpcraft-examples/lightswitch/README.md
diff --git 
a/nlpcraft-examples/lightswitch/src/test/java/org/apache/nlpcraft/examples/lightswitch/NCTestExampleModelsSpec.scala
 
b/nlpcraft-examples/lightswitch/src/test/java/org/apache/nlpcraft/examples/lightswitch/NCModelsValidationSpec.scala
similarity index 95%
rename from 
nlpcraft-examples/lightswitch/src/test/java/org/apache/nlpcraft/examples/lightswitch/NCTestExampleModelsSpec.scala
rename to 
nlpcraft-examples/lightswitch/src/test/java/org/apache/nlpcraft/examples/lightswitch/NCModelsValidationSpec.scala
index 3aaf1a6..6aa3a0c 100644
--- 
a/nlpcraft-examples/lightswitch/src/test/java/org/apache/nlpcraft/examples/lightswitch/NCTestExampleModelsSpec.scala
+++ 
b/nlpcraft-examples/lightswitch/src/test/java/org/apache/nlpcraft/examples/lightswitch/NCModelsValidationSpec.scala
@@ -21,9 +21,9 @@ import 
org.apache.nlpcraft.model.tools.test.NCTestAutoModelValidator
 import org.junit.jupiter.api.{Assertions, Test}
 
 /**
-  * JUnit example models validation.
+  * JUnit models validation.
   */
-class NCTestExampleModelsSpec {
+class NCModelsValidationSpec {
     @Test
     def test(): Unit = {
         // Instruct auto-validator what models to test.
diff --git 
a/nlpcraft-examples/minecraft/src/test/kotlin/org/apache/nlpcraft/example/minecraft/NCTestExampleModelsSpec.scala
 
b/nlpcraft-examples/minecraft/src/test/kotlin/org/apache/nlpcraft/example/minecraft/NCModelsValidationSpec.scala
similarity index 95%
rename from 
nlpcraft-examples/minecraft/src/test/kotlin/org/apache/nlpcraft/example/minecraft/NCTestExampleModelsSpec.scala
rename to 
nlpcraft-examples/minecraft/src/test/kotlin/org/apache/nlpcraft/example/minecraft/NCModelsValidationSpec.scala
index 5c237e7..f6510c7 100644
--- 
a/nlpcraft-examples/minecraft/src/test/kotlin/org/apache/nlpcraft/example/minecraft/NCTestExampleModelsSpec.scala
+++ 
b/nlpcraft-examples/minecraft/src/test/kotlin/org/apache/nlpcraft/example/minecraft/NCModelsValidationSpec.scala
@@ -19,10 +19,11 @@ package org.apache.nlpcraft.example.minecraft
 
 import org.apache.nlpcraft.model.tools.test.NCTestAutoModelValidator
 import org.junit.jupiter.api.{Assertions, Test}
+
 /**
-  * JUnit example models validation.
+  * JUnit model validation.
   */
-class NCTestExampleModelsSpec {
+class NCModelsValidationSpec {
     @Test
     def test(): Unit = {
         // Instruct auto-validator what models to test.
diff --git a/nlpcraft-examples/phone/src/main/resources/README.md 
b/nlpcraft-examples/phone/README.md
similarity index 100%
rename from nlpcraft-examples/phone/src/main/resources/README.md
rename to nlpcraft-examples/phone/README.md
diff --git a/nlpcraft-examples/sql/src/main/resources/README.md 
b/nlpcraft-examples/sql/README.md
similarity index 100%
rename from nlpcraft-examples/sql/src/main/resources/README.md
rename to nlpcraft-examples/sql/README.md
diff --git 
a/nlpcraft-examples/time/src/test/java/org/apache/nlpcraft/examples/time/NCTestExampleModelsSpec.scala
 
b/nlpcraft-examples/sql/src/test/java/org/apache/nlpcraft/examples/sql/NCModelsValidationSpec.scala
similarity index 75%
copy from 
nlpcraft-examples/time/src/test/java/org/apache/nlpcraft/examples/time/NCTestExampleModelsSpec.scala
copy to 
nlpcraft-examples/sql/src/test/java/org/apache/nlpcraft/examples/sql/NCModelsValidationSpec.scala
index 833385f..24ca1a8 100644
--- 
a/nlpcraft-examples/time/src/test/java/org/apache/nlpcraft/examples/time/NCTestExampleModelsSpec.scala
+++ 
b/nlpcraft-examples/sql/src/test/java/org/apache/nlpcraft/examples/sql/NCModelsValidationSpec.scala
@@ -15,19 +15,26 @@
  * limitations under the License.
  */
 
-package org.apache.nlpcraft.examples.time
+package org.apache.nlpcraft.examples.sql
 
+import org.apache.nlpcraft.examples.sql.db.SqlServer
 import org.apache.nlpcraft.model.tools.test.NCTestAutoModelValidator
-import org.junit.jupiter.api.{Assertions, Test}
+import org.junit.jupiter.api.{AfterEach, Assertions, BeforeEach, Test}
 
 /**
-  * JUnit example models validation.
+  * JUnit model validation.
   */
-class NCTestExampleModelsSpec {
+class NCModelsValidationSpec {
+    @BeforeEach
+    def before(): Unit = SqlServer.start()
+
+    @AfterEach
+    def after(): Unit = SqlServer.stop()
+
     @Test
     def test(): Unit = {
         // Instruct auto-validator what models to test.
-        System.setProperty("NLPCRAFT_TEST_MODELS", 
"org.apache.nlpcraft.examples.time.TimeModel")
+        System.setProperty("NLPCRAFT_TEST_MODELS", 
"org.apache.nlpcraft.examples.sql.SqlModel")
 
         // Start model auto-validator.
         Assertions.assertTrue(NCTestAutoModelValidator.isValid(),"See error 
logs above.")
diff --git a/nlpcraft-examples/time/src/main/resources/README.md 
b/nlpcraft-examples/time/README.md
similarity index 100%
rename from nlpcraft-examples/time/src/main/resources/README.md
rename to nlpcraft-examples/time/README.md
diff --git 
a/nlpcraft-examples/time/src/test/java/org/apache/nlpcraft/examples/time/NCTestExampleModelsSpec.scala
 
b/nlpcraft-examples/time/src/test/java/org/apache/nlpcraft/examples/time/NCModelsValidationSpec.scala
similarity index 94%
rename from 
nlpcraft-examples/time/src/test/java/org/apache/nlpcraft/examples/time/NCTestExampleModelsSpec.scala
rename to 
nlpcraft-examples/time/src/test/java/org/apache/nlpcraft/examples/time/NCModelsValidationSpec.scala
index 833385f..e2bf184 100644
--- 
a/nlpcraft-examples/time/src/test/java/org/apache/nlpcraft/examples/time/NCTestExampleModelsSpec.scala
+++ 
b/nlpcraft-examples/time/src/test/java/org/apache/nlpcraft/examples/time/NCModelsValidationSpec.scala
@@ -21,9 +21,9 @@ import 
org.apache.nlpcraft.model.tools.test.NCTestAutoModelValidator
 import org.junit.jupiter.api.{Assertions, Test}
 
 /**
-  * JUnit example models validation.
+  * JUnit model validation.
   */
-class NCTestExampleModelsSpec {
+class NCModelsValidationSpec {
     @Test
     def test(): Unit = {
         // Instruct auto-validator what models to test.
diff --git a/nlpcraft-examples/weather/src/main/resources/README.md 
b/nlpcraft-examples/weather/README.md
similarity index 100%
rename from nlpcraft-examples/weather/src/main/resources/README.md
rename to nlpcraft-examples/weather/README.md
diff --git 
a/nlpcraft-examples/weather/src/test/java/org/apache/nlpcraft/examples/weather/NCTestExampleModelsSpec.scala
 
b/nlpcraft-examples/weather/src/test/java/org/apache/nlpcraft/examples/weather/NCModelsValidationSpec.scala
similarity index 94%
rename from 
nlpcraft-examples/weather/src/test/java/org/apache/nlpcraft/examples/weather/NCTestExampleModelsSpec.scala
rename to 
nlpcraft-examples/weather/src/test/java/org/apache/nlpcraft/examples/weather/NCModelsValidationSpec.scala
index 7976831..e0d4127 100644
--- 
a/nlpcraft-examples/weather/src/test/java/org/apache/nlpcraft/examples/weather/NCTestExampleModelsSpec.scala
+++ 
b/nlpcraft-examples/weather/src/test/java/org/apache/nlpcraft/examples/weather/NCModelsValidationSpec.scala
@@ -21,9 +21,9 @@ import 
org.apache.nlpcraft.model.tools.test.NCTestAutoModelValidator
 import org.junit.jupiter.api.{Assertions, Test}
 
 /**
-  * JUnit example models validation.
+  * JUnit model validation.
   */
-class NCTestExampleModelsSpec {
+class NCModelsValidationSpec {
     @Test
     def test(): Unit = {
         // Instruct auto-validator what models to test.

Reply via email to