User:Minooz/PostgreSQL Adapter-nexj/alltests

From CDOT Wiki
Jump to: navigation, search

PostgreSQL Adapter for NexJ - First Test Design

Min NexJ Express | JSON_Adapter | Continuous Integration for NexJ Express Code | REST Server | PostgreSQL Adapter


How test/nexj/core/persistence/sql/ works:

In all these test files, first codes that are executed are setup() and lock() in to reset the schema 'test'.
These are methods, where tables are created for the first time, and methods in are checked and an exception will be thrown if any problem with syntax.
  • 1-
Checks the connection
  • 2-
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-
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.