public void DecreaseAmountBubbleSortTests() { for (int j = 0; j < CountRepeat; j++) { var array = SorterTestsHelper.GenerateArray(Guid.NewGuid().GetHashCode()); ArraySorter.BubbleSort(array, ComparatorFactory.GetAmountComparer(false)); Assert.IsTrue(SorterTestsHelper.IsTrustOrder(array, arr => arr.Sum(), (a, b) => a < b)); } }
public void BubbleSortTest_ArrayIsNull_ThrowsArgumentNullException(int[][] array) { var comparator = ComparatorFactory.GetAmountComparer(true); Assert.Throws <ArgumentNullException>(() => ArraySorter.BubbleSort(array, comparator)); }