ModernUO/Projects/UOContent.Tests/Tests/Utilities/TryParseTests.cs
Kamron Batman 674b8dca83
fix: Fixes character starting cities. (#1615)
### Summary

- Moves starting city info from AccountHandler to CharacterCreation
- Simplifies the logic of determining the starting cities
- Adds support for Trammel & Felucca for non-young accounts
- Fixes fall through starting city for v6+ in UOR era.
- All staff are force-sent to GA.

Closes #1408
2023-11-25 23:31:54 -08:00

21 lines
572 B
C#

using Xunit;
namespace Server.Tests.Utility;
public class TryParseTests
{
[Theory]
[InlineData("True", null, true)]
[InlineData("False", null, false)]
[InlineData("Alakazam", "Not a valid boolean string.", true)]
public void TestTryParseBool(string value, string returned, bool parsedAs)
{
string actualReturned = Server.Types.TryParse(typeof(bool), value, out object constructed);
Assert.Equal(returned, actualReturned);
if (returned == null)
{
Assert.Equal(parsedAs, constructed);
}
}
}