Bug 762: Fix sal-rest-connector unit tests
authortpantelis <tpanteli@brocade.com>
Sun, 25 May 2014 04:04:21 +0000 (00:04 -0400)
committertpantelis <tpanteli@brocade.com>
Thu, 5 Jun 2014 01:14:40 +0000 (21:14 -0400)
commit7940a30de65e81c742e13b7ac5cb6ac4830efcfb
treed0685ec200841018d3f0be2326ac1b8655c9ff6a
parentbe6679db0eb39c33dfb50ead4f9ed6fa1d894bdb
Bug 762: Fix sal-rest-connector unit tests

The cnsn-to-json/simple-data-types/xml/data.xml test file used by
CnSnToJsonBasicDataTypesTest actually contains some invalid union type data.
The tests currently pass because union type input data isn't currently
validated. Patch https://git.opendaylight.org/gerrit/#/c/7367/
in yangtools adds validation so the unit tests must be fixed before
that patch is merged.

In addition, the yangtools patch changes some static fields in
TypeDefinitionAwareCodec to private which breaks compilation of
CnSnToXmlTest. This patch modifies CnSnToXmlTest to not use the static
fields.

Change-Id: I020ffacd4a6c96265a191fa74f982de807e336a4
Signed-off-by: tpantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonBasicDataTypesTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/xml/test/CnSnToXmlTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/CodecsExceptionsCatchingTest.java
opendaylight/md-sal/sal-rest-connector/src/test/resources/cnsn-to-json/simple-data-types/xml/bad-data.xml [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/resources/cnsn-to-json/simple-data-types/xml/data.xml