public void AcceptanceCriteriaOne() { IEnumerable <UInt32> input = new List <UInt32> { 1, 3, 4 }; ICollection <UInt32> expectedOutput = new SortedSet <UInt32> { 1, 2, 4 }; foreach (var item in input) { _existingPowersOf2Service.Decompose(item); } Assert.AreEqual(expectedOutput, _existingPowersOf2Service.GetResult()); }
static void Main() { UInt32 variable; ExistingPowersOf2Service existingPowersOf2Service = new ExistingPowersOf2Service(); Console.WriteLine("Please insert variables seperated by enters."); Console.WriteLine("To see the results type anything except number."); while (true) { if (UInt32.TryParse(Console.ReadLine(), out variable)) { existingPowersOf2Service.Decompose(variable); } else { break; } } PrintResult(existingPowersOf2Service.GetResult()); }