コード例 #1
0
 public void SortAscending_WhenArray_ShouldBeSortedAscending(int arrayNumb, int expectedArrayNumb)
 {
     int[] actual = OneDimensionalArrays.SortAscending(ArrayMock.GetArrayMosk(arrayNumb));
     Assert.AreEqual(ArrayMock.GetArrayMosk(expectedArrayNumb), actual);
 }
コード例 #2
0
        public void GetMaxElementOfArray_WhenArray_ShouldReturnMaxElement(int arrayNumb, int expected)
        {
            int actual = OneDimensionalArrays.GetMaxElementOfArray(ArrayMock.GetArrayMosk(arrayNumb));

            Assert.AreEqual(expected, actual);
        }
コード例 #3
0
 public void ChangeHalfsOfArray_WhenArray_ShouldChangeHalfs(int arrayNumb, int expectedArrayNumb)
 {
     int[] actual = OneDimensionalArrays.ChangeHalfsOfArray(ArrayMock.GetArrayMosk(arrayNumb));
     Assert.AreEqual(ArrayMock.GetArrayMosk(expectedArrayNumb), actual);
 }
コード例 #4
0
        public void GetCountOfOddElements_WhenAray_ShouldReturnCountOfOddElements(int arrayNumb, int expected)
        {
            int actual = OneDimensionalArrays.GetCountOfOddElements(ArrayMock.GetArrayMosk(arrayNumb));

            Assert.AreEqual(expected, actual);
        }
コード例 #5
0
 public void ReverseArray_WhenArray_ShouldReturnReversedArray(int arrayNumb, int expectedArrayNumb)
 {
     int[] actual = OneDimensionalArrays.ReverseArray(ArrayMock.GetArrayMosk(arrayNumb));
     Assert.AreEqual(ArrayMock.GetArrayMosk(expectedArrayNumb), actual);
 }
コード例 #6
0
        public void GetSumOdd_WhenArray_ShouldRetornSumOdd(int arrayNumb, int expected)
        {
            int actual = OneDimensionalArrays.GetSumOdd(ArrayMock.GetArrayMosk(arrayNumb));

            Assert.AreEqual(expected, actual);
        }