Fix XML instance identifier encoding 09/108009/10
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Sep 2023 15:19:05 +0000 (17:19 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Sep 2023 20:44:33 +0000 (22:44 +0200)
commit9eb8ac2c8481d48e9eac7f39be3b7b89a4629e8f
tree91da52e0431a3074c1bfea84d648d2951b050519
parentf8cd76e304a92b75d50171a12817bc3ad4e8e210
Fix XML instance identifier encoding

XmlStringInstanceIdentifierCodec is not encoding prefixes properly. Use
the same trick we use for normal writeout.

Also improve mocking to cover all interactions we expect to happen.

JIRA: YANGTOOLS-1543
Change-Id: Ie018137599bd5a79db962da9573cbbca6bfc0599
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
codec/yang-data-codec-xml/src/main/java/org/opendaylight/yangtools/yang/data/codec/xml/XmlStringInstanceIdentifierCodec.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/YT1473Test.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/YT1542Test.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/YT1543Test.java [new file with mode: 0644]