public void ValidateSortNonConsecutiveList() { var sortService = new SortService(); var randomList = GenerateRandomList(1000, 100); Assert.True(IsListOrdered(sortService.BubbleMethod(randomList))); }
public void ValidateSortReturnsSameLengthList() { var sortService = new SortService(); var randomList = GenerateRandomList(100); Assert.True(sortService.BubbleMethod(randomList)?.Count == randomList.Count); }
public void ValidateSortReturnsSameNumbers() { var sortService = new SortService(); var randomList = GenerateRandomList(100); Assert.True(sortService.BubbleMethod(randomList).Intersect(randomList).Any()); }
public void ValidateSort() { var sortService = new SortService(); Assert.Equal(sortedList, sortService.BubbleMethod(unsortedList)); }
public void ValidateEmptyListPrameter() { var sortService = new SortService(); Assert.Throws <ValidationException>(() => sortService.BubbleMethod(new List <int>())); }
public void ValidateNullParameter() { var sortService = new SortService(); Assert.Throws <ValidationException>(() => sortService.BubbleMethod(null)); }