Tests: Add coverage tests for ScriptsBundler and StylesBundler.

This commit is contained in:
2023-05-28 21:13:16 +02:00
parent a10411a8a3
commit 7cb0fc1b4a
3 changed files with 119 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
using Xunit;
using VAR.WebFormsCore.Code;
using VAR.WebFormsCore.Tests.Fakes;
namespace VAR.WebFormsCore.Tests.Code;
public class ScriptsBundlerTests
{
[Fact]
public void ProcessRequest__Base__IntrinsicScripts()
{
FakeWebContext fakeWebContext = new();
ScriptsBundler scriptsBundler = new();
scriptsBundler.ProcessRequest(fakeWebContext);
Assert.Single(fakeWebContext.FakeWritePackages);
// TODO: Verify contents of intrinsic scripts
}
}

View File

@@ -0,0 +1,21 @@
using Xunit;
using VAR.WebFormsCore.Code;
using VAR.WebFormsCore.Tests.Fakes;
namespace VAR.WebFormsCore.Tests.Code;
public class StylesBundlerTests
{
[Fact]
public void ProcessRequest__Base__IntrinsicStyles()
{
FakeWebContext fakeWebContext = new();
StylesBundler stylesBundler = new();
stylesBundler.ProcessRequest(fakeWebContext);
Assert.Single(fakeWebContext.FakeWritePackages);
// TODO: Verify contents of intrinsic styles
}
}