Skip to content

Instantly share code, notes, and snippets.

@cristianmiranda
Created September 20, 2015 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cristianmiranda/ed544387a71569e00310 to your computer and use it in GitHub Desktop.
Save cristianmiranda/ed544387a71569e00310 to your computer and use it in GitHub Desktop.
OrdenadoraTest.java
package test;
import org.junit.Test;
import edu.unlam.impl.Burbuja;
import edu.unlam.impl.Insersion;
import edu.unlam.impl.QuickSort;
import edu.unlam.impl.Seleccion;
public class OrdenadoraTest {
@Test
public void insersion() {
Integer[] elements = {1, 2, 3 , 4, -1 , 10, 3, 9};
new Insersion().sort(elements);
for (Integer element : elements) {
System.out.println(element);
}
}
@Test
public void seleccion() {
Integer[] elements = {1, 2, 3 , 4, -1 , 10, 3, 9};
new Seleccion().sort(elements);
for (Integer element : elements) {
System.out.println(element);
}
}
@Test
public void burbuja() {
Integer[] elements = {1, 2, 3 , 4, -1 , 10, 3, 9};
new Burbuja().sort(elements);
for (Integer element : elements) {
System.out.println(element);
}
}
@Test
public void quicksort() {
Integer[] elements = {1, 2, 3 , 4, -1 , 10, 3, 9};
new QuickSort().sort(elements);
for (Integer element : elements) {
System.out.println(element);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment