Skip to content

Commit 3784175

Browse files
committed
test: 更新单元测试
1 parent 2d81ca3 commit 3784175

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/UnitTest/Utils/UtilityTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ public void GetJsonStringConfig_Ok()
612612
"zh-CN.json"
613613
}
614614
};
615-
var localizedStrings = Utility.GetJsonStringByTypeName(option, this.GetType().Assembly, "BootstrapBlazor.Server.Data.Foo", "zh-CN", true);
615+
var localizedStrings = Utility.GetJsonStringByTypeName(option, this.GetType().Assembly, "BootstrapBlazor.Shared.Data.Foo", "zh-CN", true);
616616
var localizer = localizedStrings.First(i => i.Name == "Name");
617617
Assert.Equal("Test-Name", localizer.Value);
618618
Assert.False(localizer.ResourceNotFound);
@@ -652,7 +652,7 @@ public void GetJsonStringConfig_Fallback()
652652
{
653653
// 回落默认语言为 en 测试用例为 zh 找不到资源文件
654654
var option = new JsonLocalizationOptions();
655-
var configs = Utility.GetJsonStringByTypeName(option, this.GetType().Assembly, "BootstrapBlazor.Server.Data.Foo", "it-it", true);
655+
var configs = Utility.GetJsonStringByTypeName(option, this.GetType().Assembly, "BootstrapBlazor.Shared.Data.Foo", "it-it", true);
656656
Assert.Empty(configs);
657657
}
658658

@@ -661,12 +661,12 @@ public void GetJsonStringConfig_Culture()
661661
{
662662
// 回落默认语音为 en 测试用例为 en-US 找不到资源文件
663663
var option = new JsonLocalizationOptions();
664-
var configs = Utility.GetJsonStringByTypeName(option, this.GetType().Assembly, "BootstrapBlazor.Server.Data.Foo", "en-US", true);
664+
var configs = Utility.GetJsonStringByTypeName(option, this.GetType().Assembly, "BootstrapBlazor.Shared.Data.Foo", "en-US", true);
665665
Assert.NotEmpty(configs);
666666

667667
var pi = option.GetType().GetProperty("EnableFallbackCulture", BindingFlags.NonPublic | BindingFlags.Instance);
668668
pi!.SetValue(option, false);
669-
configs = Utility.GetJsonStringByTypeName(option, this.GetType().Assembly, "BootstrapBlazor.Server.Data.Foo", "en", true);
669+
configs = Utility.GetJsonStringByTypeName(option, this.GetType().Assembly, "BootstrapBlazor.Shared.Data.Foo", "en", true);
670670

671671
// 禁用回落机制
672672
// UniTest 未提供 en 资源文件 断言为 Empty

0 commit comments

Comments
 (0)