More work on SeqBackgroundService, next step is tests for it.
This commit is contained in:
parent
a139b1ad08
commit
67207cf90b
27 changed files with 237 additions and 190 deletions
|
|
@ -1,13 +1,8 @@
|
|||
using Core.Configurations.SmartConfig;
|
||||
using Core.Configurations;
|
||||
using Core.Configurations;
|
||||
using FluentAssertions;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Core.Configurations.JsonConfigProvider;
|
||||
using Autofac;
|
||||
using System.Data;
|
||||
using Insight.Database;
|
||||
using Npgsql;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Core.Configurations.SmartConfigProvider;
|
||||
|
||||
namespace Tests.ConfigurationTests
|
||||
{
|
||||
|
|
@ -25,7 +20,7 @@ namespace Tests.ConfigurationTests
|
|||
}") as JToken;
|
||||
|
||||
var builder = new ConfigurationBuilder()
|
||||
.AddJsonFile("appconfiguration.dev.json")
|
||||
.AddJsonFile("ConfigurationTests/appconfiguration.dev.json")
|
||||
.Build();
|
||||
|
||||
// Act
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
using Moq;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Tests;
|
||||
using Core.Configurations.SmartConfig;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Core.Configurations.Common;
|
||||
|
||||
namespace Tests.ConfigurationTests;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
using Core.Configurations.SmartConfig;
|
||||
using Core.Configurations;
|
||||
using Core.Configurations;
|
||||
using FluentAssertions;
|
||||
using Core.Configurations.JsonConfigProvider;
|
||||
using Autofac;
|
||||
using System.Data;
|
||||
using Insight.Database;
|
||||
using Npgsql;
|
||||
using Core.Configurations.SmartConfigProvider;
|
||||
|
||||
namespace Tests.ConfigurationTests
|
||||
{
|
||||
|
|
|
|||
60
Tests/ConfigurationTests/appconfiguration.dev.json
Normal file
60
Tests/ConfigurationTests/appconfiguration.dev.json
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Host=192.168.1.57;Port=5432;Database=ptmain;User Id=sathumper;Password=3911;"
|
||||
},
|
||||
"ApplicationInsights": {
|
||||
"ConnectionString": "InstrumentationKey=6d2e76ee-5343-4691-a5e3-81add43cb584;IngestionEndpoint=https://northeurope-0.in.applicationinsights.azure.com/"
|
||||
},
|
||||
"Authentication": "SHA256",
|
||||
"Feature": {
|
||||
"Enabled": true,
|
||||
"RolloutPercentage": 25,
|
||||
"AllowedUserGroups": [ "beta" ]
|
||||
},
|
||||
"AnotherSetting": {
|
||||
|
||||
"Thresholds": {
|
||||
"High": "123",
|
||||
"Low": "-1"
|
||||
},
|
||||
"Temperature": {
|
||||
|
||||
"Indoor": {
|
||||
"Max": { "Limit": 22 },
|
||||
"Min": { "Limit": 18 }
|
||||
},
|
||||
"Outdoor": {
|
||||
"Max": { "Limit": 12 },
|
||||
"Min": { "Limit": 9 }
|
||||
}
|
||||
}
|
||||
},
|
||||
"Serilog": {
|
||||
"MinimumLevel": {
|
||||
"Default": "Information",
|
||||
"Override": {
|
||||
"Microsoft": "Warning",
|
||||
"System": "Warning"
|
||||
}
|
||||
},
|
||||
"WriteTo": [
|
||||
{
|
||||
"Name": "Seq",
|
||||
"Args": {
|
||||
"serverUrl": "http://localhost:5341",
|
||||
"apiKey": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"Enrich": [
|
||||
"WithMachineName",
|
||||
"WithThreadId",
|
||||
"WithProcessId",
|
||||
"WithEnvironmentName"
|
||||
],
|
||||
"Properties": {
|
||||
"Application": "PlanTempus"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue