Skip to content

Commit 47b1b39

Browse files
committed
Update test
1 parent 2f5271a commit 47b1b39

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

Directory.Build.props

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
<PropertyGroup>
99
<Version>2.0.0</Version>
10+
<PackageVersion>2.0.0-rc.1</PackageVersion>
1011
</PropertyGroup>
1112

1213
<PropertyGroup>

src/Lepo.i18n/LocalizationBuilderExtensions.cs

+2
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ CultureInfo culture
158158
{
159159
try
160160
{
161+
// NOTE: Fix net framework satellite assembly loading
162+
161163
ResourceManager resourceManager = new(baseName, assembly);
162164
ResourceSet? resourceSet = resourceManager.GetResourceSet(culture, true, true);
163165

tests/Lepo.i18n.DependencyInjection.UnitTests/Lepo.i18n.DependencyInjection.UnitTests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net8.0</TargetFrameworks>
4+
<TargetFramework>net8.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<IsTestProject>true</IsTestProject>
77
<IsTrimmable>false</IsTrimmable>

tests/Lepo.i18n.DependencyInjection.UnitTests/StringLocalizerBuilderExtensionsTests.cs

+3-12
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Copyright (C) Leszek Pomianowski and Lepo.i18n Contributors.
44
// All Rights Reserved.
55

6-
using System.Globalization;
6+
using Lepo.i18n.DependencyInjection.UnitTests.Resources;
77

88
namespace Lepo.i18n.DependencyInjection.UnitTests;
99

@@ -18,17 +18,8 @@ public void FromResource_ShouldAddLocalizations_WhenResourceSetIsNotNull()
1818

1919
_ = services.AddStringLocalizer(b =>
2020
{
21-
_ = b.SetCulture("pl-PL");
22-
_ = b.FromResource(
23-
"Lepo.i18n.DependencyInjection.UnitTests.Resources.Test",
24-
new CultureInfo("pl-PL")
25-
);
26-
_ = b.FromResource(
27-
"Lepo.i18n.DependencyInjection.UnitTests.Resources.Test",
28-
new CultureInfo("en-US")
29-
);
30-
//_ = b.FromResource<Test>("pl-PL");
31-
//_ = b.FromResource<Test>("en-US");
21+
_ = b.FromResource<Test>("pl-PL");
22+
_ = b.FromResource<Test>("en-US");
3223
});
3324

3425
ServiceProvider serviceProvider = services.BuildServiceProvider();

0 commit comments

Comments
 (0)