PKHeX/Tests/PKHeX.Tests/Util/GeoLocationTests.cs
Kurt 9dae7dad67 Misc updates
move encountertype datasource providing to core
fix rerolling EC not updating characteristic
remove some repeat logic calls
relocate geolocation name fetch to separate class, add tests to ensure
functionality, add languageID->country/region fetch method
2018-08-25 17:04:01 -07:00

33 lines
972 B
C#

using Microsoft.VisualStudio.TestTools.UnitTesting;
using PKHeX.Core;
namespace PKHeX.Tests.Util
{
[TestClass]
public class GeoLocationTests
{
private const string GeoLocationCategory = "GeoLocation Tests";
[TestMethod]
[TestCategory(GeoLocationCategory)]
public void CountryFetch()
{
string japan = GeoLocation.GetCountryName("en", 1);
Assert.AreEqual("Japan", japan);
string argentina = GeoLocation.GetCountryName(LanguageID.English, 10);
Assert.AreEqual("Argentina", argentina);
}
[TestMethod]
[TestCategory(GeoLocationCategory)]
public void RegionFetch()
{
string tokyo = GeoLocation.GetRegionName("en", 1, 2);
Assert.AreEqual("Tokyo", tokyo);
string bermuda = GeoLocation.GetRegionName(LanguageID.Korean, 186, 1);
Assert.AreEqual("버뮤다", bermuda);
}
}
}