+ /**
+ *
+ */
+ @Test
+ public void nodeSchemasInMultipleChoicesTest() {
+ try {
+ TestUtils
+ .writeCompNodeWithSchemaContextToJson(TestUtils
+ .loadCompositeNode("/yang-to-json-conversion/choice/xml/data_more_choices_same_level.xml"),
+ "/yang-to-json-conversion/choice/xml", modules, dataSchemaNode);
+ } catch (WebApplicationException | IOException e) {
+ // shouldn't end here
+ assertTrue(false);
+ }
+ }
+
+ /**
+ * Test whether is possible to find data schema for node which is specified
+ * as dirrect subnode of choice (case without CASE key word)
+ */
+ @Test
+ public void nodeSchemasInCaseNotDefinedWithCaseKeyword() {
+ try {
+ TestUtils.writeCompNodeWithSchemaContextToJson(TestUtils
+ .loadCompositeNode("/yang-to-json-conversion/choice/xml/data_case_defined_without_case.xml"),
+ "/yang-to-json-conversion/choice/xml", modules, dataSchemaNode);
+ } catch (WebApplicationException | IOException e) {
+ // shouldn't end here
+ assertTrue(false);
+ }
+ }
+
+ /**
+ * Test of multiple use of choices
+ */
+ @Test
+ public void nodeSchemasInThreeChoicesAtSameLevel() {
+ try {
+ TestUtils.writeCompNodeWithSchemaContextToJson(TestUtils
+ .loadCompositeNode("/yang-to-json-conversion/choice/xml/data_three_choices_same_level.xml"),
+ "/yang-to-json-conversion/choice/xml", modules, dataSchemaNode);
+ } catch (WebApplicationException | IOException e) {
+ // shouldn't end here
+ assertTrue(false);
+ }
+ }