public void Compare_XLessThanY_ReturnFalse() { var sortAlgorithm = new SortAlgorithm(); var bacon = new string[] { "B", "A" }; var result = sortAlgorithm.Compare(bacon[0], bacon[1]); Assert.IsFalse(result); }
public void Exchange_ReturnTrue() { var sortAlgorithm = new SortAlgorithm(); var bacon = new string[] { "B", "A" }; sortAlgorithm.Exchange(bacon, 0, 1); Assert.IsTrue(bacon[0] == "A"); Assert.IsTrue(bacon[1] == "B"); }
public void IsSorted_ArrayIsSorted_ReturnTrue() { // Setup var sortAlgorithm = new SortAlgorithm(); var bacon = new string[] { "A", "B", "C", "D" }; // Operate var result = sortAlgorithm.IsSorted(bacon); // Assert Assert.IsTrue(result); }
static void Main(string[] args) { var sort = new SortAlgorithm(); var bacon = new string[] { "I", "A", "H", "C", "F", "E", "D", "G", "B" }; }