Skip to content

Commit

Permalink
test: Added test for HTML output
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-mrzyglod committed Aug 31, 2024
1 parent 40d914a commit 425783b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ace-tests/Reworked/OutputTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,26 @@ public void Output_WhenMarkdownOutputIsRequested_ItShouldGenerateWithoutError()

Assert.That(outputFile, Is.Not.Null);
}

[Test]
public void Output_WhenHtmlOutputIsRequested_ItShouldGenerateWithoutError()
{
var outputFilename = $"ace_test_{DateTime.Now.Ticks}";
var exitCode = Program.Main([
"templates/reworked/automation-account/automation-account.bicep",
"cf70b558-b930-45e4-9048-ebcefb926adf",
"arm-estimator-tests-rg",
"--generateHtmlOutput",
"--htmlOutputFilename",
outputFilename,
"--mocked-retail-api-response-path",
"mocked-responses/retail-api/automation-account/usage-patterns.json"
]);

Assert.That(exitCode, Is.EqualTo(0));

var outputFile = File.ReadAllText($"{outputFilename}.html");

Assert.That(outputFile, Is.Not.Null);
}
}

0 comments on commit 425783b

Please sign in to comment.