Skip to content

Commit 19a5d77

Browse files
author
Patrick Bruner
committed
pluginregistry needs too be instantiated
1 parent d6b6669 commit 19a5d77

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/LogExpert.Tests/BufferShiftTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using LogExpert.Classes.Log;
22
using LogExpert.Core.Classes.Log;
33
using LogExpert.Core.Entities;
4-
using LogExpert.Entities;
54
using LogExpert.PluginRegistry.FileSystem;
65

76
using NUnit.Framework;
@@ -42,6 +41,8 @@ public void TestShiftBuffers1()
4241
{
4342
Encoding = Encoding.Default
4443
};
44+
45+
PluginRegistry.PluginRegistry.Instance.Create(testDirectory.FullName, 500);
4546
LogfileReader reader = new(files.Last.Value, encodingOptions, true, 40, 50, options);
4647
reader.ReadFiles();
4748

src/LogExpert.Tests/RolloverHandlerTestBase.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
using LogExpert.Core.Classes.Log;
2+
13
using System;
24
using System.Collections.Generic;
35
using System.IO;
46

5-
using LogExpert.Core.Classes.Log;
6-
77
namespace LogExpert.Tests
88
{
99
internal class RolloverHandlerTestBase
1010
{
1111
#region Fields
1212

13-
protected const string TEST_DIR_NAME = "test";
13+
public const string TEST_DIR_NAME = "test";
14+
public DirectoryInfo testDirectory;
1415

1516
#endregion
1617

@@ -19,6 +20,7 @@ protected LinkedList<string> CreateTestFilesWithDate()
1920
{
2021
LinkedList<string> createdFiles = new();
2122
DirectoryInfo dInfo = Directory.CreateDirectory(TEST_DIR_NAME);
23+
testDirectory = dInfo;
2224
createdFiles.AddLast(CreateFile(dInfo, "engine_2010-06-08_1.log"));
2325
createdFiles.AddLast(CreateFile(dInfo, "engine_2010-06-08_0.log"));
2426
createdFiles.AddLast(CreateFile(dInfo, "engine_2010-06-10_0.log"));
@@ -34,6 +36,7 @@ protected LinkedList<string> CreateTestFilesWithoutDate()
3436
{
3537
LinkedList<string> createdFiles = new();
3638
DirectoryInfo dInfo = Directory.CreateDirectory(TEST_DIR_NAME);
39+
testDirectory = dInfo;
3740
createdFiles.AddLast(CreateFile(dInfo, "engine.log.6"));
3841
createdFiles.AddLast(CreateFile(dInfo, "engine.log.5"));
3942
createdFiles.AddLast(CreateFile(dInfo, "engine.log.4"));

0 commit comments

Comments
 (0)