示例#1
0
        public string Wordify(string numericValue, WordifierTypeEnum wordifierType)
        {
            var wordifier = _provider.GetWordifier(wordifierType);
            var num       = wordifier.Validate(numericValue);

            return(wordifier.Convert(num));
        }
示例#2
0
        public IWordifier GetWordifier(WordifierTypeEnum wordifierType)
        {
            switch (wordifierType)
            {
            case WordifierTypeEnum.Currency:
                return(new Currency.CurrencyWordifier());

            default:
                throw new ArgumentException($"Unsupported type {wordifierType}.");
            }
        }
示例#3
0
 public void GetWordifier_Should_Return_Correctly(WordifierTypeEnum typeEnum, Type expectedWordifier)
 {
     _provider.GetWordifier(typeEnum).Should().BeOfType(expectedWordifier);
 }