Skip to content

Commit 94d5179

Browse files
authored
fix test{Bigger, Less}Than() (#6)
1 parent 40d5780 commit 94d5179

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

domain/src/test/java/projekt/ComparableUnitTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public void initialize(int testObjectCount) {
2626

2727
public void testBiggerThen() {
2828
for (int i = 0; i < testObjects.length; i++) {
29-
for (int j = i + 1; j < testObjects.length; j++) {
30-
Assertions.assertTrue(testObjects[i].compareTo(testObjects[j]) < 0);
29+
for (int j = 0; j < i; j++) {
30+
Assertions.assertTrue(testObjects[i].compareTo(testObjects[j]) > 0);
3131
}
3232
}
3333
}
@@ -41,8 +41,8 @@ public void testAsBigAs() {
4141

4242
public void testLessThen() {
4343
for (int i = 0; i < testObjects.length; i++) {
44-
for (int j = 0; j < i; j++) {
45-
Assertions.assertTrue(testObjects[i].compareTo(testObjects[j]) > 0);
44+
for (int j = i + 1; j < testObjects.length; j++) {
45+
Assertions.assertTrue(testObjects[i].compareTo(testObjects[j]) < 0);
4646
}
4747
}
4848
}

0 commit comments

Comments
 (0)