diff --git a/src/ServiceControl.Monitoring.Tests/API/SettingsTests.cs b/src/ServiceControl.Monitoring.Tests/API/SettingsTests.cs
new file mode 100644
index 0000000..ca2f065
--- /dev/null
+++ b/src/ServiceControl.Monitoring.Tests/API/SettingsTests.cs
@@ -0,0 +1,15 @@
+namespace ServiceControl.Monitoring.Tests.API
+{
+ using System.Configuration;
+ using NUnit.Framework;
+ using Particular.Approvals;
+
+ class SettingsTests
+ {
+ [Test]
+ public void PlatformSampleSettings()
+ {
+ Approver.Verify(Settings.Load(new SettingsReader(ConfigurationManager.AppSettings)));
+ }
+ }
+}
diff --git a/src/ServiceControl.Monitoring.Tests/App.config b/src/ServiceControl.Monitoring.Tests/App.config
new file mode 100644
index 0000000..ed4fa22
--- /dev/null
+++ b/src/ServiceControl.Monitoring.Tests/App.config
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/ServiceControl.Monitoring.Tests/ApprovalFiles/SettingsTests.PlatformSampleSettings.approved.txt b/src/ServiceControl.Monitoring.Tests/ApprovalFiles/SettingsTests.PlatformSampleSettings.approved.txt
new file mode 100644
index 0000000..5a184c5
--- /dev/null
+++ b/src/ServiceControl.Monitoring.Tests/ApprovalFiles/SettingsTests.PlatformSampleSettings.approved.txt
@@ -0,0 +1,17 @@
+{
+ "EndpointName": "Particular.Monitoring",
+ "ServiceName": "Particular.Monitoring",
+ "TransportType": "NServiceBus.ServiceControlLearningTransport, ServiceControl.Transports.LearningTransport",
+ "ErrorQueue": "error",
+ "LogPath": "C:\\Logs",
+ "LogLevel": {
+ "Name": "Warn",
+ "Ordinal": 3
+ },
+ "Username": null,
+ "EnableInstallers": false,
+ "HttpHostName": "localhost",
+ "HttpPort": "9999",
+ "EndpointUptimeGracePeriod": "00:00:40",
+ "SkipQueueCreation": false
+}
\ No newline at end of file
diff --git a/src/ServiceControl.Monitoring.Tests/ServiceControl.Monitoring.Tests.csproj b/src/ServiceControl.Monitoring.Tests/ServiceControl.Monitoring.Tests.csproj
index 6ba8f60..2c0f904 100644
--- a/src/ServiceControl.Monitoring.Tests/ServiceControl.Monitoring.Tests.csproj
+++ b/src/ServiceControl.Monitoring.Tests/ServiceControl.Monitoring.Tests.csproj
@@ -12,7 +12,7 @@
-
+
\ No newline at end of file
diff --git a/src/ServiceControl.Monitoring/Settings.cs b/src/ServiceControl.Monitoring/Settings.cs
index 9c74f8a..91007ec 100644
--- a/src/ServiceControl.Monitoring/Settings.cs
+++ b/src/ServiceControl.Monitoring/Settings.cs
@@ -48,7 +48,7 @@ internal static Settings Load(SettingsReader reader)
// debugging or if the entry is removed manually. In those circumstances default to the folder containing the exe
internal static string DefaultLogLocation()
{
- var assemblyLocation = Assembly.GetEntryAssembly().Location;
+ var assemblyLocation = Assembly.GetExecutingAssembly().Location;
return Path.GetDirectoryName(assemblyLocation);
}
}