Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m-g-k committed Oct 15, 2023
1 parent 66a0fe8 commit e9a3cea
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/EventLogMonitorTests/EventLogMonitorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ limitations under the License.
using System.Runtime.InteropServices;
using System.Numerics;
using Microsoft.Win32;
using System.Reflection;

namespace EventLogMonitor;

Expand Down Expand Up @@ -1228,9 +1229,10 @@ public void MiscSpecificMessages(int testNumber, string culture, string dllLocat
monitor.MonitorEventLog();
string logOut = output.ToString();

stdoutput.WriteLine("STARTING OUTPUT:");
// incase of an error, output expected and actual as it's easier to debug
stdoutput.WriteLine("Test Run Output:");
stdoutput.WriteLine(logOut); //orig
stdoutput.WriteLine("Expected Count: " + expectedResult.Count);
stdoutput.WriteLine("Expected Count and Output: " + expectedResult.Count);
foreach(string line in expectedResult) {
stdoutput.WriteLine(line);
}
Expand All @@ -1239,12 +1241,12 @@ public void MiscSpecificMessages(int testNumber, string culture, string dllLocat
Assert.Equal(8, lines.Length); // one extra closing test line is returned
List<string> results = new(lines[0..^1]);

stdoutput.WriteLine("Results count: " + results.Count);
stdoutput.WriteLine("\nResults Count and Output: " + results.Count);
foreach(string line in results) {
stdoutput.WriteLine(line);
}

Assert.Equal(expectedResult, results);
Assert.Equivalent(expectedResult, results, strict: true);
Assert.StartsWith("6 Entries shown from the", lines[7]);
}

Expand Down

0 comments on commit e9a3cea

Please sign in to comment.