fix: replace deprecated TestContext with BunitContext

This commit is contained in:
Stevan Freeborn
2025-11-22 07:23:37 -06:00
parent a1fa9f8a37
commit 4d186a0274
3 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
@inherits Bunit.TestContext
@inherits Bunit.BunitContext
@code
{
@@ -11,7 +11,7 @@
.Setup(x => x.GetPostsAsync())
.ReturnsAsync(new List<Post>());
var ctx = new TestContext();
var ctx = new BunitContext();
ctx.Services.AddSingleton(_postServiceMock.Object);
@@ -32,7 +32,7 @@
.Setup(x => x.GetPostsAsync())
.ReturnsAsync(posts);
var ctx = new TestContext();
var ctx = new BunitContext();
ctx.Services.AddScoped(_ => _postServiceMock.Object);
+2 -2
View File
@@ -1,11 +1,11 @@
@inherits Bunit.TestContext
@inherits Bunit.BunitContext
@code
{
[Test]
public void Footer_WhenRendered_ItShouldRenderFooterWithNavLinks()
{
var ctx = new TestContext();
var ctx = new BunitContext();
var cut = ctx.Render(@<Footer />);
+1 -1
View File
@@ -1,4 +1,4 @@
@inherits Bunit.TestContext
@inherits Bunit.BunitContext
@code
{