Interface NCTestClient

  • public interface NCTestClient
    Model testing client. This client can be used for convenient unit testing of the models together with any popular unit testing framework such as TestNG or JUnit. The instance of test client should be obtained via NCTestClientBuilder.

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

     public class AlarmTest {
         private NCTestClient cli;
         void setUp() throws NCException, IOException {
             cli = new NCTestClientBuilder().newBuilder().build();
         void tearDown() throws NCException, IOException {
             if (cli != null)
         public void test() throws NCException, IOException {
             // Should be passed.
             assertTrue(cli.ask("Ping me in 3 minutes").isOk());
             assertTrue(cli.ask("Buzz me in an hour and 15mins").isOk());
             assertTrue(cli.ask("Set my alarm for 30s").isOk());
    See Also: