Beispiel #1
0
        public void Delete_repeating_elements()
        {
            int[]          X     = { -5, -5, -5, -5, -5 };
            int[]          Y     = new int[X.Length];
            ArrayProcessor array = new ArrayProcessor();

            Y = array.SortAndFilter(X);
            Assert.AreEqual(-5, Y[0]);
        }
Beispiel #2
0
        public void Sort_elements()
        {
            int[]          X     = { -5, -2, -8, 10, 11, 45 };
            int[]          Y     = new int[X.Length];
            ArrayProcessor array = new ArrayProcessor();

            Y = array.SortAndFilter(X);
            int[] X1 = { -8, -5, -2, 10, 11, 45 };
            CollectionAssert.AreEqual(X1, Y);
        }
Beispiel #3
0
        public void Test_array_()
        {
            ArrayProcessor array = new ArrayProcessor();

            int[] X = { -5, -2, -2, -2, -8, -5, 10, 11, 11, 45 };
            int   a = array.SortAndFilter(X).Length;

            int[] Y = new int[a];
            Y = array.SortAndFilter(X);
            int[] X1 = { -8, -5, -2, 10, 11, 45 };
            CollectionAssert.AreEquivalent(X1, Y);
        }