Skip to content

Commit

Permalink
Merge pull request #96 from VeyronSakai/tests/add-unity-build-reporter-2
Browse files Browse the repository at this point in the history
Add test case
  • Loading branch information
VeyronSakai authored May 20, 2024
2 parents e06dbd6 + f3923b9 commit 732f0bd
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Tests/Editor/UnityBuildReportWriterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,30 @@ public void Write_OnlyTitleAndBasicInfoAreEnabled_OnlyTitleAndBasicInfoAreWritte
Assert.AreEqual(expected, actual);
}

[Test]
public void Write_AllConfigAreDisabled_NothingIsWritten()
{
// Arrange
var jobSummaryRepository = new FakeJobSummaryRepository(_outputPath);
var buildReportRepository = new StubBuildReportRepository();
var reportConfigRepository = new StubReportConfigRepository(
writesTitle: false,
writesBasicInfo: false,
writesBuildSteps: false,
writesSourceAssets: false,
writesOutputFiles: false,
writesIncludedModules: false
);
var writer =
new UnityBuildReportWriter(jobSummaryRepository, buildReportRepository, reportConfigRepository);

// Act
writer.Write();

// Assert
Assert.IsFalse(File.Exists(_outputPath));
}

[SetUp, TearDown]
public void Clean()
{
Expand Down

0 comments on commit 732f0bd

Please sign in to comment.