File tree Expand file tree Collapse file tree 7 files changed +10
-11
lines changed
LinkDotNet.Blog.IntegrationTests/Web
Features/Admin/BlogPostEditor
LinkDotNet.Blog.TestUtilities
LinkDotNet.Blog.UnitTests/Web/Features/Components Expand file tree Collapse file tree 7 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 4040 <PackageVersion Include =" NSubstitute" Version =" 5.3.0" />
4141 <PackageVersion Include =" RavenDB.TestDriver" Version =" 7.0.3" />
4242 <PackageVersion Include =" Shouldly" Version =" 4.3.0" />
43- <PackageVersion Include =" bunit" Version =" 2.0.24-preview" />
44- <PackageVersion Include =" bunit.generators" Version =" 2.0.24-preview" OutputItemType =" Analyzer" ReferenceOutputAssembly =" false" />
43+ <PackageVersion Include =" bunit" Version =" 2.0.36-preview" />
4544 <PackageVersion Include =" coverlet.collector" Version =" 6.0.4" >
4645 <PrivateAssets >all</PrivateAssets >
4746 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
Original file line number Diff line number Diff line change 1616 </ItemGroup >
1717
1818 <ItemGroup >
19- <PackageReference Include =" bunit.generators" />
2019 <PackageReference Include =" bunit" />
2120 <PackageReference Include =" Shouldly" />
2221 <PackageReference Include =" NSubstitute" />
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public async Task ShouldSaveBlogPostOnSave()
4949 instantRegistry . Received ( 1 ) . RunInstantJob < SimilarBlogPostJob > ( Arg . Any < object > ( ) , Arg . Any < CancellationToken > ( ) ) ;
5050 }
5151
52- private static void TriggerNewBlogPost ( RenderedComponent < CreateNewBlogPost > cut )
52+ private static void TriggerNewBlogPost ( IRenderedComponent < CreateNewBlogPost > cut )
5353 {
5454 cut . Find ( "#title" ) . Input ( "My Title" ) ;
5555 cut . Find ( "#short" ) . Input ( "My short Description" ) ;
Original file line number Diff line number Diff line change 1212using LinkDotNet . Blog . Web . Features . Admin . BlogPostEditor . Components ;
1313using LinkDotNet . Blog . Web . Features . Components ;
1414using LinkDotNet . Blog . Web . Features . Services ;
15+ using Microsoft . AspNetCore . Components ;
1516using Microsoft . EntityFrameworkCore ;
1617using Microsoft . Extensions . DependencyInjection ;
1718using NCronJob ;
@@ -68,7 +69,7 @@ public void ShouldThrowWhenNoIdProvided()
6869 act . ShouldThrow < ArgumentNullException > ( ) ;
6970 }
7071
71- private static void TriggerUpdate ( RenderedFragment cut )
72+ private static void TriggerUpdate ( IRenderedComponent < IComponent > cut )
7273 {
7374 cut . Find ( "#short" ) . Input ( "My new Description" ) ;
7475
Original file line number Diff line number Diff line change @@ -177,10 +177,10 @@ private static void SetupGetAll(
177177 return ( repoMock , calcMock ) ;
178178 }
179179
180- private RenderedComponent < Profile > RenderProfileWithEmptyInformation ( )
180+ private IRenderedComponent < Profile > RenderProfileWithEmptyInformation ( )
181181 => Render < Profile > ( p => p . Add ( s => s . ProfileInformation , new ProfileInformationBuilder ( ) . Build ( ) ) ) ;
182182
183- private RenderedComponent < Profile > RenderProfileInAdmin ( )
183+ private IRenderedComponent < Profile > RenderProfileInAdmin ( )
184184 => Render < Profile > ( p => p
185185 . Add ( s => s . ProfileInformation , new ProfileInformationBuilder ( ) . Build ( ) )
186186 . Add ( s => s . ShowAdminActions , true ) ) ;
Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ namespace LinkDotNet.Blog.TestUtilities;
55
66public static class BunitExtensions
77{
8- public static RenderedComponent < TComponent > WaitForComponent < TComponent > ( this RenderedFragment component )
8+ public static IRenderedComponent < TComponent > WaitForComponent < TComponent > ( this IRenderedComponent < IComponent > component )
99 where TComponent : IComponent
1010 {
1111 component . WaitForState ( component . HasComponent < TComponent > ) ;
1212 return component . FindComponent < TComponent > ( ) ;
1313 }
1414
15- public static IReadOnlyList < RenderedComponent < TComponent > > WaitForComponents < TComponent > ( this RenderedFragment component )
15+ public static IReadOnlyList < IRenderedComponent < TComponent > > WaitForComponents < TComponent > ( this IRenderedComponent < IComponent > component )
1616 where TComponent : IComponent
1717 {
1818 component . WaitForState ( component . HasComponent < TComponent > ) ;
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public void ShouldSetCanoncialLinkWithoutQueryParameter()
7070 }
7171
7272 private static void AssertMetaTagExistsWithValue (
73- RenderedFragment cut ,
73+ IRenderedComponent < IComponent > cut ,
7474 string metaTag ,
7575 string metaTagValue ,
7676 string ? ogPropertyName = null )
@@ -87,7 +87,7 @@ private static void AssertMetaTagExistsWithValue(
8787 }
8888
8989 private static bool GetMetaTagExists (
90- RenderedFragment cut ,
90+ IRenderedComponent < IComponent > cut ,
9191 string metaTag )
9292 {
9393 var metaTags = cut . FindAll ( "meta" ) ;
You can’t perform that action at this time.
0 commit comments