diff --git a/test/Blog.Tests/Unit/Feed.spec.razor b/test/Blog.Tests/Unit/Feed.spec.razor index 708f372..e4a4244 100644 --- a/test/Blog.Tests/Unit/Feed.spec.razor +++ b/test/Blog.Tests/Unit/Feed.spec.razor @@ -1,6 +1,6 @@ -@inherits Bunit.TestContext +@inherits Bunit.BunitContext -@code +@code { private Mock _postServiceMock = new(); @@ -8,10 +8,10 @@ public void Feed_WhenRendedAndNoPosts_ItShouldRenderNoPostsMessage() { _postServiceMock - .Setup(x => x.GetPostsAsync()) - .ReturnsAsync(new List()); + .Setup(x => x.GetPostsAsync()) + .ReturnsAsync(new List()); - var ctx = new TestContext(); + var ctx = new BunitContext(); ctx.Services.AddSingleton(_postServiceMock.Object); @@ -24,15 +24,15 @@ public void Feed_WhenRendedAndPosts_ItShouldRenderPosts() { List posts = [ - new Post() { Title = "Post 1", }, - new Post() { Title = "Post 2", }, - ]; + new Post() { Title = "Post 1", }, +new Post() { Title = "Post 2", }, +]; _postServiceMock - .Setup(x => x.GetPostsAsync()) - .ReturnsAsync(posts); + .Setup(x => x.GetPostsAsync()) + .ReturnsAsync(posts); - var ctx = new TestContext(); + var ctx = new BunitContext(); ctx.Services.AddScoped(_ => _postServiceMock.Object); diff --git a/test/Blog.Tests/Unit/Footer.spec.razor b/test/Blog.Tests/Unit/Footer.spec.razor index 80e5717..a774944 100644 --- a/test/Blog.Tests/Unit/Footer.spec.razor +++ b/test/Blog.Tests/Unit/Footer.spec.razor @@ -1,11 +1,11 @@ -@inherits Bunit.TestContext +@inherits Bunit.BunitContext -@code +@code { [Test] public void Footer_WhenRendered_ItShouldRenderFooterWithNavLinks() { - var ctx = new TestContext(); + var ctx = new BunitContext(); var cut = ctx.Render(@