static void Run(string[] args) { ServiceCollection serviceCollection = new ServiceCollection(); ConfigureServices(serviceCollection); string rawString = configuration.GetSection("text").Value.ToLower(); IAlphabetMachine alphabetMachine = serviceProvider.GetService <IAlphabetMachine>(); Alphabet tempAlphabet; // Create alphabet list foreach (char @char in rawString) { tempAlphabet = alphabetMachine.CreateAlphabet(@char); alphabetMachine.AddAlphabet(tempAlphabet); } // Get output string from alphabet list string outputString = alphabetMachine.GetOutPutString(); Console.WriteLine($"Ouput: {outputString}"); }
public AlphabetMachineTests() { this._machine = new AlphabetMachine(); }