Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMacocian committed Nov 4, 2023
1 parent 85921c6 commit dbd45f3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Daybreak.Tests/Services/JsonLoggerProviderTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
using Daybreak.Services.Logging;
using Daybreak.Configuration.Options;
using Daybreak.Services.Logging;
using FluentAssertions;
using LiteDB;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NSubstitute;
using NSubstitute.Extensions;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Logging;
Expand All @@ -21,7 +25,9 @@ public void InitializeProvider()
{
File.Delete("Daybreak.db");
this.liteDatabase = new LiteDatabase("Daybreak.db");
this.logsManager = new JsonLogsManager(this.liteDatabase.GetCollection<Daybreak.Models.Log>());
var options = Substitute.For<ILiveOptions<LauncherOptions>>();
options.Value.Returns(new LauncherOptions { PersistentLogging = true });
this.logsManager = new JsonLogsManager(this.liteDatabase.GetCollection<Daybreak.Models.Log>(), options);
this.loggerProvider = new CVLoggerProvider(this.logsManager);
}

Expand Down

0 comments on commit dbd45f3

Please sign in to comment.