Bug 2358 - Remove tests json to cnsn and add tests json to nn 20/19520/9
authorary <jatoth@cisco.com>
Wed, 29 Apr 2015 10:09:41 +0000 (12:09 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 15 Jun 2015 08:49:45 +0000 (08:49 +0000)
commita3fd2b66c8121a8603d684b97c1fb7076d933d99
tree0bfbda39b669eb9b03adb23d2ce42108b73677c1
parente1b79358817f1202c50f7410b92746b0777d0642
Bug 2358 - Remove tests json to cnsn and add tests json to nn

Tests of codecs are included in codecs yangtools yang-data-codec-gson and yang-data-impl but
we test codec on input data and also with presentation of Rest path.

* remove all tests json to composite node and simple node
* rewrite json leafref input tests from comp and simple node to normalized node
  * we're testing REST provider URI path translator with payload
* add test for test data in json with identityref to normalized node
  * positive test
  * test data in builded normalized node with data in json
    * used identityref type to reference an existing identity
* add test for test data in json with leafref to normalized node
  * positive test
  * test data in builded normalized node with data in json
    * used leafref type to reference particular leaf instance in the data tree
* add test for test data in json with more type of nodes and values
  * positive tests
    * test normalized node from json with:
      * simple data in list
      * simple data in container
      * multiple items in leaf-list
      * multiple items in list
      * empty leaf
      * augmented data
  * negative tests
    * test fail on bad top level elements
      * contains 3 situations
    * test fail for null data
      * empty leaf-list
      * leaf without any value
    * test on build normalized node with blank json
    * test fail with different namespaces
    * test fail because of unsupported format of json
    * test on invalid URI character

Change-Id: Icb5ff5d11843123c79859a0c75d7df7bad8a0b44
Signed-off-by: Jakub Toth <jatoth@cisco.com>
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/json/to/cnsn/test/JsonIdentityrefToCnSnTest.java [deleted file]
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/json/to/cnsn/test/JsonLeafrefToCnSnTest.java [deleted file]
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/json/to/cnsn/test/JsonToCnSnTest.java [deleted file]
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/json/to/nn/test/JsonIdentityrefToNnTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/json/to/nn/test/JsonLeafrefToNnTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/json/to/nn/test/JsonToNnTest.java [new file with mode: 0644]