public void TestEmpty() { var array = new int[] { }; var result = obj.Sort(array); var expected = new int[] {}; Assert.AreEqual(result.Length == 0, expected.Length == 0);; }
static void Main(string[] args) { Console.WriteLine("Bubble sort"); Console.Write("Enter your array: "); var parts = Console.ReadLine().Split(new[] { " ", ",", ";" }, StringSplitOptions.RemoveEmptyEntries); var array = new int[parts.Length]; for (int i = 0; i < parts.Length; i++) { array[i] = Convert.ToInt32(parts[i]); } Bubble_Sort obj = new Bubble_Sort(); Console.WriteLine("Sorted array: {0}", string.Join(", ", obj.Sort(array))); Console.ReadLine(); }