Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(Language): Add test to check the language
To not have another issue where the culture info isn't set properly
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using NUnit.Framework; | ||
using SoundSwitch.Localization.Factory; | ||
using SoundSwitch.Localization.Factory.Lang; | ||
|
||
namespace SoundSwitch.Tests | ||
{ | ||
[TestFixture] | ||
public class LanguageTests | ||
{ | ||
/// <summary> | ||
/// Check that we can load the culture info of all the <see cref="ILang"/> | ||
/// </summary> | ||
[Test] | ||
public void LanguageLoading() | ||
{ | ||
var langFactory = new LanguageFactory(); | ||
Assert.DoesNotThrow(() => | ||
{ | ||
foreach (var lang in langFactory.AllImplementations.Values) | ||
{ | ||
var _ = lang.CultureInfo; | ||
} | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net5.0-windows</TargetFramework> | ||
|
||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="NUnit" Version="3.12.0" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\SoundSwitch\SoundSwitch.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters