public ICharacterProvider GetProvider(CultureInfo culture) { if (culture == null) { throw new ArgumentNullException(nameof(culture)); } var key = culture.TwoLetterISOLanguageName; ICharacterProvider result; if (providers.TryGetValue(key, out result) == false) { result = new EnglishCharacterProvider(); } return(result); }
public void Test_EnglishCharacterProvider_Create() { var testProvider = new EnglishCharacterProvider(); testProvider.TwoLetterLanguageName.Should().Be("en"); }