Skip to content

Commit

Permalink
Ensure trailing slash for testdata folder (#8479)
Browse files Browse the repository at this point in the history
  • Loading branch information
altinnadmin authored May 6, 2022
1 parent 1520eac commit 1fd1f0e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/Configuration/LocalPlatformSettings.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
using System.IO;

namespace LocalTest.Configuration
{
/// <summary>
/// Settings for accessing bridge functionality
/// </summary>
public class LocalPlatformSettings
{
string _localTestDataPath = null;

/// <summary>
/// The endpoint for the bridge
/// </summary>
Expand All @@ -20,7 +24,18 @@ public class LocalPlatformSettings
/// <summary>
/// Folder where static test data like profile, authorization, and register data is available for local testing.
/// </summary>
public string LocalTestingStaticTestDataPath { get; set; }
public string LocalTestingStaticTestDataPath {
get => _localTestDataPath;
set {
if (!value.EndsWith(Path.DirectorySeparatorChar) &&
!value.EndsWith(Path.AltDirectorySeparatorChar))
{
value += Path.DirectorySeparatorChar;
}

_localTestDataPath = value;
}
}

/// <summary>
/// Url for the local app when LocalAppMode == http
Expand Down

0 comments on commit 1fd1f0e

Please sign in to comment.