private void Process_Algorithm(object sender, RoutedEventArgs e) { // string output = ""; if ((bool)bubble.IsChecked) { List <int> convertedInput = StringToIntList.Convert(input.Text); List <int> sortedList = Bubble.Sort(convertedInput); result.Content = IntListToString.Convert(sortedList); } ; if ((bool)selection.IsChecked) { List <int> convertedInput = StringToIntList.Convert(input.Text); List <int> sortedList = Selection.Sort(convertedInput); result.Content = IntListToString.Convert(sortedList); } if ((bool)fibonacci.IsChecked) { MessageBox.Show(fibonacci.Name); } }
public void IntListToString_returnedTypeIsString() { // arrange List <int> inputString = new List <int>() { 1, 2, 3, 4 }; // act var actual = IntListToString.Convert(inputString); // assert Assert.IsInstanceOfType(actual, typeof(string)); }
public void IntListToString_inputCollection_returnString() { // arrange List <int> inputString = new List <int>() { 1, 2, 3, 4 }; string expected = "1234"; // act string actual = IntListToString.Convert(inputString); // assert Assert.AreEqual(expected, actual); }