Skip to content

Commit

Permalink
[SHIBUI-1772]
Browse files Browse the repository at this point in the history
new test
  • Loading branch information
jj committed Apr 2, 2021
1 parent ca9e8b4 commit 70159e3
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package edu.internet2.tier.shibboleth.admin.ui.domain

import edu.internet2.tier.shibboleth.admin.ui.opensaml.OpenSamlObjects
import spock.lang.Shared
import spock.lang.Specification

class VersioningTests extends Specification{
@Shared
OpenSamlObjects openSamlObjects

def setup() {
this.openSamlObjects = new OpenSamlObjects()
this.openSamlObjects.init()
}

def "test that two loaded entity descriptors gets the same version when load from the same file"() {
given:
def xmlBytes = this.class.getResource('/metadata/SHIBUI-1723-1.xml').bytes
def ed1 = openSamlObjects.unmarshalFromXml(xmlBytes)
def ed2 = openSamlObjects.unmarshalFromXml(xmlBytes)

expect:
ed1.hashCode() == ed2.hashCode()
}
}

0 comments on commit 70159e3

Please sign in to comment.