File tree Expand file tree Collapse file tree
test/UnitTest/Localization Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,7 +158,6 @@ public void GetAllStrings_FromType()
158158 Assert . NotEmpty ( items ) ;
159159 }
160160
161-
162161 [ Fact ]
163162 public void GetAllStrings_FromBase ( )
164163 {
@@ -237,6 +236,7 @@ public void GetAllStrings_FromJson()
237236 var resolve = provider . GetRequiredService < ILocalizationResolve > ( ) ;
238237 Assert . Empty ( resolve . GetAllStringsByCulture ( true ) ) ;
239238 }
239+
240240 [ Fact ]
241241 public void GetString_FromBaseTypeJson ( )
242242 {
@@ -245,13 +245,15 @@ public void GetString_FromBaseTypeJson()
245245 sc . AddBootstrapBlazor ( ) ;
246246
247247 var provider = sc . BuildServiceProvider ( ) ;
248- var localizer = provider . GetRequiredService < IStringLocalizer < Foo2 > > ( ) ;
249-
248+ var localizer = provider . GetRequiredService < IStringLocalizer < SubFoo > > ( ) ;
250249 Assert . Equal ( "姓名" , localizer [ "Name" ] . Value ) ;
250+ }
251+
252+ class SubFoo : Foo
253+ {
251254
252- var resolve = provider . GetRequiredService < ILocalizationResolve > ( ) ;
253- Assert . Empty ( resolve . GetAllStringsByCulture ( true ) ) ;
254255 }
256+
255257 [ Fact ]
256258 public void GetAllStrings_FromResolver ( )
257259 {
You can’t perform that action at this time.
0 commit comments