Se comenzaron a realizar unit tests
Junto con ello se modificaron las clases para poder hacer la conexion a una uri diferente para sqlite.
This commit is contained in:
@@ -24,15 +24,13 @@
|
||||
|
||||
package danielcortes.xyz.utils;
|
||||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestInstance;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestInstance;
|
||||
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
class NaturalOrderComparatorTest {
|
||||
@@ -77,14 +75,13 @@ class NaturalOrderComparatorTest {
|
||||
|
||||
@Test
|
||||
void testIfArraySortIsCorrect(){
|
||||
assertNotEquals(toCompare, original);
|
||||
|
||||
NaturalOrderComparator comparator = new NaturalOrderComparator();
|
||||
toCompare.sort(comparator);
|
||||
|
||||
assertEquals(toCompare, natural);
|
||||
assertNotEquals(toCompare, lexicographic);
|
||||
assertNotEquals(toCompare, original);
|
||||
assertThat(toCompare)
|
||||
.containsSequence(natural)
|
||||
.doesNotContainSequence(lexicographic)
|
||||
.doesNotContainSequence(original);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user