Skip to content

Commit

Permalink
Fix path for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Juris Gekiss authored and Juris Gekiss committed Aug 16, 2024
1 parent 8385e77 commit 195c5de
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public EidasLightProtocolSerializerFixture() {
public void ReadEidasAuthorizationRequest() {
XmlReaderSettings settings = new XmlReaderSettings();

XmlTextReader textReader = new XmlTextReader(@"..\..\..\_Data\EidasLightRequest.xml");
XmlTextReader textReader = new XmlTextReader(Path.Combine("..", "..", "..", "_Data", "EidasLightRequest.xml"));
XmlReader reader = XmlReader.Create(textReader, settings);

var serializer = new EidasLightProtocolSerializer();
Expand Down Expand Up @@ -59,7 +59,7 @@ public void ReadEidasAuthorizationRequest() {
public void ReadEidasAuthorizationRequestFull() {
XmlReaderSettings settings = new XmlReaderSettings();

XmlTextReader textReader = new XmlTextReader(@"..\..\..\_Data\EidasLightRequestFull.xml");
XmlTextReader textReader = new XmlTextReader(Path.Combine("..", "..", "..", "_Data", "EidasLightRequestFull.xml"));
XmlReader reader = XmlReader.Create(textReader, settings);

var serializer = new EidasLightProtocolSerializer();
Expand Down Expand Up @@ -109,7 +109,7 @@ public void ReadEidasAuthorizationRequestFull() {
public void ReadEidasAuthorizationRequestMin() {
XmlReaderSettings settings = new XmlReaderSettings();

XmlTextReader textReader = new XmlTextReader(@"..\..\..\_Data\EidasLightRequestMin.xml");
XmlTextReader textReader = new XmlTextReader(Path.Combine("..", "..", "..", "_Data", "EidasLightRequestMin.xml"));
XmlReader reader = XmlReader.Create(textReader, settings);

var serializer = new EidasLightProtocolSerializer();
Expand All @@ -124,7 +124,7 @@ public void ReadEidasAuthorizationRequestMin() {

var eidasLightMessage = message as EidasLightRequest;

Assert.Equal(1, eidasLightMessage.LevelsOfAssurance.Count);
Assert.Single(eidasLightMessage.LevelsOfAssurance);
Assert.Equal(new Uri("http://uri1"), eidasLightMessage.LevelsOfAssurance.First().Value);
Assert.Equal(LevelOfAssuranceType.Notified, eidasLightMessage.LevelsOfAssurance.First().Type);

Expand All @@ -147,7 +147,7 @@ public void ReadEidasAuthorizationRequestMin() {
public void ReadEidasAuthorizationRequestEmpty() {
XmlReaderSettings settings = new XmlReaderSettings();

XmlTextReader textReader = new XmlTextReader(@"..\..\..\_Data\EidasLightRequestEmpty.xml");
XmlTextReader textReader = new XmlTextReader(Path.Combine("..", "..", "..", "_Data", "EidasLightRequestEmpty.xml"));
XmlReader reader = XmlReader.Create(textReader, settings);

var serializer = new EidasLightProtocolSerializer();
Expand All @@ -158,7 +158,7 @@ public void ReadEidasAuthorizationRequestEmpty() {
public void ReadEidasAuthorizationResponseFull() {
XmlReaderSettings settings = new XmlReaderSettings();

XmlTextReader textReader = new XmlTextReader(@"..\..\..\_Data\EidasLightResponseFull.xml");
XmlTextReader textReader = new XmlTextReader(Path.Combine("..", "..", "..", "_Data", "EidasLightResponseFull.xml"));
XmlReader reader = XmlReader.Create(textReader, settings);

var serializer = new EidasLightProtocolSerializer();
Expand Down Expand Up @@ -208,7 +208,7 @@ public void ReadEidasAuthorizationResponseFull() {
public void ReadEidasAuthorizationResponseMin() {
XmlReaderSettings settings = new XmlReaderSettings();

XmlTextReader textReader = new XmlTextReader(@"..\..\..\_Data\EidasLightResponseMin.xml");
XmlTextReader textReader = new XmlTextReader(Path.Combine("..", "..", "..", "_Data", "EidasLightResponseMin.xml"));
XmlReader reader = XmlReader.Create(textReader, settings);

var serializer = new EidasLightProtocolSerializer();
Expand Down Expand Up @@ -313,8 +313,8 @@ private void ValidateMessage(string xml) {
dtdSettings.XmlResolver = new TestXmlResolver();

readersettings.Schemas.XmlResolver = new TestXmlResolver();
readersettings.Schemas.Add(null, @"..\..\..\_Data\LightRequest.xsd");
readersettings.Schemas.Add(null, @"..\..\..\_Data\LightResponse.xsd");
readersettings.Schemas.Add(null, Path.Combine("..", "..", "..", "_Data", "LightRequest.xsd"));
readersettings.Schemas.Add(null, Path.Combine("..", "..", "..", "_Data", "LightResponse.xsd"));
//readersettings.Schemas.Add("http://www.w3.org/2000/09/xmldsig#", XmlReader.Create(@"..\..\..\_Data\xmldsig-core-schema.xsd", dtdSettings));
//readersettings.Schemas.Add("http://www.w3.org/2001/04/xmlenc#", XmlReader.Create(@"..\..\..\_Data\xenc-schema.xsd", dtdSettings));
//readersettings.Schemas.Add(null, @"..\..\..\_Data\saml-schema-protocol-2.0.xsd");
Expand Down

0 comments on commit 195c5de

Please sign in to comment.