PKHeX/Tests/PKHeX.Core.Tests/Util/GeoLocationTests.cs
Evan Dixon 9c87ad2977 Port tests to .Net Core (#2156)
* Rewrite tests with XUnit and .Net Core
* Add better "because" message
* Skipping test that was not ready & convert the fact to a theory
* Tweak casing
* Convert select date tests to theories
* Make the GetStringList load lock safer
2018-11-06 15:25:35 -08:00

37 lines
1.3 KiB
C#

using FluentAssertions;
using PKHeX.Core;
using Xunit;
namespace PKHeX.Tests.Util
{
public class GeoLocationTests
{
[Theory]
[InlineData("en", 1, "Japan")]
public void ReturnsCorrectCountryNameByString(string language, int country, string expectedName)
{
GeoLocation.GetCountryName(language, country).Should().Be(expectedName);
}
[Theory]
[InlineData(LanguageID.English, 10, "Argentina")]
public void ReturnsCorrectCountryNameByLanguageId(LanguageID languageId, int country, string expectedName)
{
GeoLocation.GetCountryName(languageId, country).Should().Be(expectedName);
}
[Theory]
[InlineData("en", 1, 2, "Tokyo")]
public void ReturnsCorrectRegionNameByString(string language, int country, int region, string expectedName)
{
GeoLocation.GetRegionName(language, country, region).Should().Be(expectedName);
}
[Theory]
[InlineData(LanguageID.Korean, 186, 1, "버뮤다")]
public void ReturnsCorrectRegionNameByLanguageId(LanguageID languageId, int country, int region, string expectedName)
{
GeoLocation.GetRegionName(languageId, country, region).Should().Be(expectedName);
}
}
}