Ejemplo n.º 1
0
        public void N3_menor_retorna_N3()
        {
            int tamanho_array = 3;

            int[]       n        = new int[] { 5, 3, 1 };
            int[]       arrumado = new int[] { 1, 3, 5 };
            int[]       menor    = new int[tamanho_array];
            Exercicio02 ex02     = new Exercicio02();

            menor = ex02.Ordenar(3, n, 1);

            CollectionAssert.AreEquivalent(arrumado, menor);
        }
Ejemplo n.º 2
0
        public void Retorna_ordem_decrescente()
        {
            int tamanho_array = 5;

            int[]       n        = new int[] { 5, 1, 3, 8, 9 };
            int[]       arrumado = new int[] { 9, 8, 5, 3, 1 };
            int[]       menor    = new int[tamanho_array];
            Exercicio02 ex02     = new Exercicio02();

            menor = ex02.Ordenar(tamanho_array, n, 2);

            CollectionAssert.AreEquivalent(arrumado, menor);
        }
Ejemplo n.º 3
0
        public void N1_menor_retorna_N1()
        {
            int tamanho_array = 3;

            int[]       n        = new int[] { 82, 45, 18 };
            int[]       arrumado = new int[] { 18, 45, 82 };
            int[]       menor    = new int[tamanho_array];
            Exercicio02 ex02     = new Exercicio02();

            menor = ex02.Ordenar(3, n, 1);

            CollectionAssert.AreEquivalent(arrumado, menor);
        }