Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ namespace ServiceControl.UnitTests;
[TestFixture]
public class PopulateAppSettingsTests
{
const string ConfigFileName = "ServiceControl.Audit.exe.config";

[Test]
public async Task Should_populate_appSettings_from_exe_config_file()
{
Expand All @@ -24,7 +26,7 @@ public async Task Should_populate_appSettings_from_exe_config_file()
</configuration>
""";

await File.WriteAllTextAsync("ServiceControl.Audit.exe.config", config);
await File.WriteAllTextAsync(ConfigFileName, config);

var fileName = "ServiceControl.Audit";
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand Down Expand Up @@ -70,5 +72,5 @@ public async Task Should_populate_appSettings_from_exe_config_file()
}

[TearDown]
public void TearDown() => File.Delete("ServiceControl.exe.config");
public void TearDown() => File.Delete(ConfigFileName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ namespace ServiceControl.UnitTests;
[TestFixture]
public class PopulateAppSettingsTests
{
const string ConfigFileName = "ServiceControl.Monitoring.exe.config";

[Test]
public async Task Should_populate_appSettings_from_exe_config_file()
{
Expand All @@ -24,7 +26,7 @@ public async Task Should_populate_appSettings_from_exe_config_file()
</configuration>
""";

await File.WriteAllTextAsync("ServiceControl.Monitoring.exe.config", config);
await File.WriteAllTextAsync(ConfigFileName, config);

var fileName = "ServiceControl.Monitoring";
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand Down Expand Up @@ -74,5 +76,5 @@ public async Task Should_populate_appSettings_from_exe_config_file()
}

[TearDown]
public void TearDown() => File.Delete("ServiceControl.exe.config");
public void TearDown() => File.Delete(ConfigFileName);
}
6 changes: 4 additions & 2 deletions src/ServiceControl.UnitTests/PopulateAppSettingsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ namespace ServiceControl.UnitTests;
[TestFixture]
public class PopulateAppSettingsTests
{
const string ConfigFileName = "ServiceControl.exe.config";

[Test]
public async Task Should_populate_appSettings_from_exe_config_file()
{
Expand All @@ -24,7 +26,7 @@ public async Task Should_populate_appSettings_from_exe_config_file()
</configuration>
""";

await File.WriteAllTextAsync("ServiceControl.exe.config", config);
await File.WriteAllTextAsync(ConfigFileName, config);

var fileName = "ServiceControl";
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand Down Expand Up @@ -72,5 +74,5 @@ public async Task Should_populate_appSettings_from_exe_config_file()
}

[TearDown]
public void TearDown() => File.Delete("ServiceControl.exe.config");
public void TearDown() => File.Delete(ConfigFileName);
}