From 33947b30de50275e53e693b27fe0821136e1e94e Mon Sep 17 00:00:00 2001 From: Juris Gekiss Date: Wed, 3 Apr 2024 22:32:17 +0300 Subject: [PATCH] Fix unit tests on linux --- test/Abc.Xacml.UnitTests/XacmlEvaluationEngineFixture.cs | 4 ++-- test/Abc.Xacml.UnitTests/XacmlProtocolSerializerFixture.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/Abc.Xacml.UnitTests/XacmlEvaluationEngineFixture.cs b/test/Abc.Xacml.UnitTests/XacmlEvaluationEngineFixture.cs index 5687aef..c7f1d45 100644 --- a/test/Abc.Xacml.UnitTests/XacmlEvaluationEngineFixture.cs +++ b/test/Abc.Xacml.UnitTests/XacmlEvaluationEngineFixture.cs @@ -260,7 +260,7 @@ public void IID030_11() { [Test] public void EvaluateRun() { XmlDocument xmlDoc = new XmlDocument(); - xmlDoc.Load(@"..\..\..\_Data\XACML_Samples\2.0\EvaluationSampleRequest.xml"); //c:\aa.xml + xmlDoc.Load(Path.Combine("..", "..", "..", "_Data", "XACML_Samples", "2.0", "EvaluationSampleRequest.xml")); var serialize = new Xacml20ProtocolSerializer(); @@ -269,7 +269,7 @@ public void EvaluateRun() { XmlDocument xmlDoc2 = new XmlDocument(); - xmlDoc2.Load(@"..\..\..\_Data\XACML_Samples\2.0\EvaluationSamplePolicy.xml"); //c:\aa.xml + xmlDoc2.Load(Path.Combine("..", "..", "..", "_Data", "XACML_Samples", "2.0", "EvaluationSamplePolicy.xml")); var serialize2 = new Xacml20ProtocolSerializer(); diff --git a/test/Abc.Xacml.UnitTests/XacmlProtocolSerializerFixture.cs b/test/Abc.Xacml.UnitTests/XacmlProtocolSerializerFixture.cs index 0a6a93d..c2e1775 100644 --- a/test/Abc.Xacml.UnitTests/XacmlProtocolSerializerFixture.cs +++ b/test/Abc.Xacml.UnitTests/XacmlProtocolSerializerFixture.cs @@ -23,7 +23,7 @@ public void SetUp() { private static string TestCasePath { get { var dir = SetUpClass.BaseDirectory; - return Path.Combine(dir, @"..\..\..\_Data"); + return Path.Combine(dir, "..", "..", "..", "_Data"); } } @@ -109,7 +109,7 @@ public void WriteResponse_11() [Test] public void ReadRequest_11() { XmlDocument xmlDoc = new XmlDocument(); - xmlDoc.Load(Path.Combine(TestCasePath, @"XACML_Samples\1.1\Example_1\Request.xml")); + xmlDoc.Load(Path.Combine(TestCasePath, "XACML_Samples", "1.1", "Example_1", "Request.xml")); var serialize = new Xacml10ProtocolSerializer(); @@ -163,7 +163,7 @@ public void ReadRequest_11() { [Test] public void ReadPolicy_11() { XmlDocument xmlDoc = new XmlDocument(); - xmlDoc.Load(Path.Combine(TestCasePath, @"XACML_Samples\1.1\Example_1\Rule_1.xml")); + xmlDoc.Load(Path.Combine(TestCasePath, "XACML_Samples", "1.1", "Example_1", "Rule_1.xml")); var serialize = new Xacml10ProtocolSerializer();