Bug 2358 - Remove tests json to cnsn and add tests json to nn 90/19290/7
authorary <jatoth@cisco.com>
Wed, 29 Apr 2015 10:09:41 +0000 (12:09 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 23 Jul 2015 09:03:57 +0000 (09:03 +0000)
commit9443160eb8a995c5d1f05ba5ed2486ecde085fe1
treef66e9a517ad089972e965ca38c5686dcdc9f8eb7
parent81236f34ad88ffcb71c8d7cdb15b82bad2e50251
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>
(cherry picked from commit a3fd2b66c8121a8603d684b97c1fb7076d933d99)
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]