Skip navigation links
NLPCraft 0.7.0

Package org.nlpcraft.model.test

Contains model testing framework.

See: Description

Package org.nlpcraft.model.test Description

Contains model testing framework.

Here's an code snippet from Alarm Clock example illustrating the usage of test framework together with JUnit 5:

 public class AlarmTest {
     private NCTestClient client;

     void setUp() throws NCException, IOException {
         client = new NCTestClientBuilder().newBuilder().build();

     void tearDown() throws NCException, IOException {

     public void test() throws NCException, IOException {
         // Empty parameter.

         // Only latin charset is supported.
         assertTrue(client.ask("El tiempo en EspaƱa").isFailed());

         // Should be passed.
         assertTrue(client.ask("Ping me in 3 minutes").isOk());
         assertTrue(client.ask("Buzz me in an hour and 15mins").isOk());
         assertTrue(client.ask("Set my alarm for 30s").isOk());
Skip navigation links
NLPCraft 0.7.0 Examples Star Fork

Copyright © 2013-2019 NLPCraft Project. All rights reserved.