Open main menu

CDOT Wiki β

PostgreSQL Adapter-nexj/alltests

Revision as of 19:56, 26 January 2014 by Andrew (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Important.png
This page may be obsolete.
It contains historical information.

PostgreSQL Adapter for NexJ - First Test Design


Running AllTests.java

How test/nexj/core/persistence/sql/AllTests.java works:

In all these test files, first codes that are executed are setup() and lock() in SQLDataTest.java to reset the schema 'test'.
These are methods, where tables are created for the first time, and methods in SQLSchemaManager.java are checked and an exception will be thrown if any problem with syntax.
  • 1- SQLWriterConnectionTest.java
Checks the connection
  • 2- SQLAdapterTest.java
Deals with data values in tables
Modifies some values in some tables or insert new values, then SELECT with particular statements and checks if the result is as what is expected.
  • 3- SQLSchemaManagerTest.java
Deals with syntax and how to change each syntax to match with each SQL database system's properties.
Makes sure those methods concerning creation or manipulation of structure of a table work properly.