Skip to content

Commit

Permalink
Updated Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DrizzlyOwl committed Dec 2, 2024
1 parent c4b4f03 commit 320d60c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Dfe.PrepareConversions.Configuration;
using Xunit;

namespace Dfe.PrepareConversions.Tests.Configuration;

public class ApplicationInsightsOptionsTests
{
[Fact]
public void Configuration_section_should_be_ApplicationInsights()
{
Assert.Equal("ApplicationInsights", ApplicationInsightsOptions.ConfigurationSection);
}

[Fact]
public void ConnectionString_should_default_to_null()
{
var _options = new ApplicationInsightsOptions();
Assert.Null(_options.ConnectionString);
}

[Fact]
public void InstrumentationKey_should_default_to_null()
{
var _options = new ApplicationInsightsOptions();
Assert.Null(_options.InstrumentationKey);
}

[Fact]
public void EnableBrowserAnalytics_should_default_to_null()
{
var _options = new ApplicationInsightsOptions();
Assert.Null(_options.EnableBrowserAnalytics);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
public class ApplicationInsightsOptions
{
public const string ConfigurationSection = "ApplicationInsights";
public string ConnectionString { get; set; }
public string InstrumentationKey { get; set; }
public string ConnectionString { get; init; }
public string InstrumentationKey { get; init; }
public string EnableBrowserAnalytics { get; init; }
}

0 comments on commit 320d60c

Please sign in to comment.