mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Apply suggestions from code review
This commit is contained in:
parent
45e0f7893b
commit
d7c9b14175
@ -19,12 +19,11 @@ namespace Jellyfin.Server.Implementations.Tests.Localization
|
|||||||
{
|
{
|
||||||
UICulture = "de-DE"
|
UICulture = "de-DE"
|
||||||
});
|
});
|
||||||
var countries = localizationManager.GetCountries();
|
var countries = localizationManager.GetCountries().ToList();
|
||||||
var countryInfos = countries.ToList();
|
|
||||||
|
|
||||||
Assert.Equal(139, countryInfos.Count);
|
Assert.Equal(139, countries.Count);
|
||||||
|
|
||||||
var germany = countryInfos.FirstOrDefault(x => x.Name.Equals("DE", StringComparison.Ordinal));
|
var germany = countries.FirstOrDefault(x => x.Name.Equals("DE", StringComparison.Ordinal));
|
||||||
Assert.NotNull(germany);
|
Assert.NotNull(germany);
|
||||||
Assert.Equal("Germany", germany!.DisplayName);
|
Assert.Equal("Germany", germany!.DisplayName);
|
||||||
Assert.Equal("DEU", germany.ThreeLetterISORegionName);
|
Assert.Equal("DEU", germany.ThreeLetterISORegionName);
|
||||||
@ -43,7 +42,7 @@ namespace Jellyfin.Server.Implementations.Tests.Localization
|
|||||||
|
|
||||||
Assert.Equal(189, cultures.Count);
|
Assert.Equal(189, cultures.Count);
|
||||||
|
|
||||||
var germany = cultures.FirstOrDefault(x => x.TwoLetterISOLanguageName == "de");
|
var germany = cultures.FirstOrDefault(x => x.TwoLetterISOLanguageName.Equals("de", StringComparison.Ordinal));
|
||||||
Assert.NotNull(germany);
|
Assert.NotNull(germany);
|
||||||
Assert.Equal("ger", germany!.ThreeLetterISOLanguageName);
|
Assert.Equal("ger", germany!.ThreeLetterISOLanguageName);
|
||||||
Assert.Equal("German", germany.DisplayName);
|
Assert.Equal("German", germany.DisplayName);
|
||||||
@ -86,7 +85,7 @@ namespace Jellyfin.Server.Implementations.Tests.Localization
|
|||||||
|
|
||||||
Assert.Equal(23, ratings.Count);
|
Assert.Equal(23, ratings.Count);
|
||||||
|
|
||||||
var tvma = ratings.FirstOrDefault(x => x.Name == "TV-MA");
|
var tvma = ratings.FirstOrDefault(x => x.Name.Equals("TV-MA", StringComparison.Ordinal));
|
||||||
Assert.NotNull(tvma);
|
Assert.NotNull(tvma);
|
||||||
Assert.Equal(9, tvma!.Value);
|
Assert.Equal(9, tvma!.Value);
|
||||||
}
|
}
|
||||||
@ -103,7 +102,7 @@ namespace Jellyfin.Server.Implementations.Tests.Localization
|
|||||||
|
|
||||||
Assert.Equal(10, ratings.Count);
|
Assert.Equal(10, ratings.Count);
|
||||||
|
|
||||||
var fsk = ratings.FirstOrDefault(x => x.Name == "FSK-12");
|
var fsk = ratings.FirstOrDefault(x => x.Name.Equals("FSK-12", StringComparison.Ordinal));
|
||||||
Assert.NotNull(fsk);
|
Assert.NotNull(fsk);
|
||||||
Assert.Equal(7, fsk!.Value);
|
Assert.Equal(7, fsk!.Value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user