Skip to Content.
Sympa Menu

shibboleth-dev - JUnit test failure in current HEAD, Equivalent XML not .equals()

Subject: Shibboleth Developers

List archive

JUnit test failure in current HEAD, Equivalent XML not .equals()


Chronological Thread 
  • From: "Howard Gilbert" <>
  • To: <>
  • Subject: JUnit test failure in current HEAD, Equivalent XML not .equals()
  • Date: Fri, 11 Mar 2005 10:23:27 -0500

at edu.internet2.middleware.shibboleth.aa.arp.ArpTests.testRepositories(ArpTests.java:523)

 

assertTrue(

   "File-based ARP Repository did not return the correct site ARP",

            directXML.toString().replaceAll(">[\t\r\n ]+<", "><").equals(

            processedXML.toString().replaceAll(">[\t\r\n ]+<", "><")));

 

junit.framework.AssertionFailedError: File-based ARP Repository did not return the correct site ARP.

 

directXML is

 

<?xml version="1.0" encoding="UTF-8"?>

<AttributeReleasePolicy xmlns="urn:mace:shibboleth:arp:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd">

            <Description>Simplest possible ARP.</Description>

            <Rule>

                        <Target>

                                    <AnyTarget/>

                        </Target>

                        <Attribute name="urn:mace:dir:attribute-def:eduPersonAffiliation">

                                    <AnyValue release="permit"/>

                        </Attribute>

            </Rule>

</AttributeReleasePolicy>

 

processedXML is:

 

<?xml version="1.0" encoding="UTF-8"?>

<AttributeReleasePolicy xmlns="urn:mace:shibboleth:arp:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd">

<Description>Simplest possible ARP.</Description>

<Rule>

<Target>

<AnyTarget/>

</Target>

<Attribute xmlns:ns0="urn:mace:shibboleth:arp:1.0" ns0:name="urn:mace:dir:attribute-def:eduPersonAffiliation">

<AnyValue ns0:release="permit"/>

</Attribute>

</Rule>

</AttributeReleasePolicy>

 

There is no particular reason why the XML serializer logic should have put in an explicit xmlns identical to the default xmlns in the Attribute element, but it is valid and the two XML productions are equivalent even if not identical.



  • JUnit test failure in current HEAD, Equivalent XML not .equals(), Howard Gilbert, 03/11/2005

Archive powered by MHonArc 2.6.16.

Top of Page