Skip to content

Commit

Permalink
Merge pull request #4 from chickensoft-games/fix-test-fix
Browse files Browse the repository at this point in the history
test: prevent more spurious file creation
  • Loading branch information
jolexxa authored Feb 1, 2025
2 parents 7de6335 + 70b802d commit e173831
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Chickensoft.Log.Tests/test/src/FileWriterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@ public void DefaultFileName() {

[Fact]
public void DefaultInstance() {
using var tester = new FileWriterStreamTester();

var writer = FileWriter.Instance();
writer.ShouldNotBeNull();
writer.ShouldBeOfType<FileWriter>();
}

[Fact]
public void NewInstance() {
using var tester = new FileWriterStreamTester();

var filename = "test.log";
var writer = FileWriter.Instance(filename);
writer.ShouldNotBeNull();
Expand All @@ -73,6 +77,8 @@ public void NewInstance() {

[Fact]
public void ReusesInstanceAndRemoves() {
using var tester = new FileWriterStreamTester();

var filename = "test.log";
var writer1 = FileWriter.Instance(filename);
var writer2 = FileWriter.Instance(filename);
Expand Down

0 comments on commit e173831

Please sign in to comment.