New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elements with different namespace prefix are detected as DIFFERENT instead of SIMILAR #22

Closed
drauch opened this Issue Oct 18, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@drauch

drauch commented Oct 18, 2017

When comparing these two XMLs:

// Actual = <Root xmlns:x=""http://namespace.com""><x:Elem></x:Elem><x:Elem2></x:Elem2></Root>
// Expected = <Root xmlns:y=""http://namespace.com""><y:Elem></y:Elem><y:Elem2></y:Elem2></Root>

with "similar" behavior, it should return no differences. But it does report:

Expected element tag name 'x:Elem' but was 'y:Elem' - comparing <x:Elem...> at /Root[1]/Elem[1] to <y:Elem...> at /Root[1]/Elem[1] (DIFFERENT), Expected element tag name 'x:Elem2' but was 'y:Elem2' - comparing <x:Elem2...> at /Root[1]/Elem2[1] to <y:Elem2...> at /Root[1]/Elem2[1] (DIFFERENT)

Encountered in v2.5. @bodewig has already located the bug, see second-to-last post in xmlunit/user-guide#12 for details.

Best regards,
D.R.

@bodewig

This comment has been minimized.

Show comment
Hide comment
@bodewig

bodewig Oct 18, 2017

Member

root cause see xmlunit/user-guide#12 (comment)

the fix will be to do the same as the Java version - and to write a Unit test :-)

Member

bodewig commented Oct 18, 2017

root cause see xmlunit/user-guide#12 (comment)

the fix will be to do the same as the Java version - and to write a Unit test :-)

bodewig added a commit that referenced this issue Oct 20, 2017

push placeholder stuff to 2.6.0
I plan to cut 2.5.1 with the fix for #22, the placeholders module will
be part of the source tarballs but I won't publish the nuget packages.

@bodewig bodewig closed this in 1771123 Oct 20, 2017

bodewig added a commit to xmlunit/xmlunit that referenced this issue Oct 20, 2017

namespace prefix tests
proves xmlunit/xmlunit.net#22 doesn't affect
XMLUnit for Java
@bodewig

This comment has been minimized.

Show comment
Hide comment
@bodewig

bodewig Oct 20, 2017

Member

I've just released 2.5.1, it is already available from nuget.org as well as https://github.com/xmlunit/xmlunit.net/releases/tag/v2.5.1

Member

bodewig commented Oct 20, 2017

I've just released 2.5.1, it is already available from nuget.org as well as https://github.com/xmlunit/xmlunit.net/releases/tag/v2.5.1

@drauch

This comment has been minimized.

Show comment
Hide comment
@drauch

drauch Oct 21, 2017

Very nice! Thank you for the quick fix! Will give it a try on Monday! 👍

drauch commented Oct 21, 2017

Very nice! Thank you for the quick fix! Will give it a try on Monday! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment