public void TestRussian() { var locale = new RussianLocale(); var keypad = new T9Keypad(locale); var input = "привет"; var output = "55556422233666"; var fact = keypad.Encode(input); Assert.AreEqual(output, fact); }
public void TestEnglish() { var locale = new EnglishLocale(); var keypad = new T9Keypad(locale); var input = "hello world"; var output = "4433555 555666096667775553"; var fact = keypad.Encode(input); Assert.AreEqual(output, fact); }
static void Main(string[] args) { ILocale locale = new EnglishLocale(); IKeypad keypad = new T9Keypad(locale); var tasks = new List <Task>(); foreach (var file in FileConverter.InputFiles) { var task = Task.Factory.StartNew(() => new FileConverter(keypad, file).Convert() ); tasks.Add(task); } Task.WaitAll(tasks.ToArray()); Console.WriteLine("See .in and .out files in /bin/debug\r\nPress enter to exit."); Console.ReadLine(); }