diff --git a/api-webapp/src/test/kotlin/BasicTests.kt b/api-webapp/src/test/kotlin/BasicTests.kt
index 9fca17e..a34ffd6 100644
--- a/api-webapp/src/test/kotlin/BasicTests.kt
+++ b/api-webapp/src/test/kotlin/BasicTests.kt
@@ -416,7 +416,7 @@ class BasicTests: TestBase() {
games_np = TestAPI.post("/api/tour/$id_np/pair/5", Json.Array("all")).asArray()
logger.info("games for round 5: {}", games_np.toString())
- assertTrue(compare_weights("weights.txt", "opengotha/simpleswiss_weights_R5.txt"), "Not matching opengotha weights for round 4")
+ assertTrue(compare_weights("weights.txt", "opengotha/simpleswiss_weights_R5.txt"), "Not matching opengotha weights for round 5")
assertTrue(compare_games(games_np, Json.parse(pairings_R5.toString())!!.asArray()), "pairings for round 5 differ")
//assertEquals(pairings_R4, games_np.toString(), "pairings for round 3 differ")
logger.info("Pairings for round 5 match OpenGotha")
@@ -428,6 +428,21 @@ class BasicTests: TestBase() {
}
logger.info("Results succesfully entered for round 5")
+ // *** Test Round 6 ***
+ games_np = TestAPI.post("/api/tour/$id_np/pair/6", Json.Array("all")).asArray()
+ logger.info("games for round 6: {}", games_np.toString())
+
+ assertTrue(compare_weights("weights.txt", "opengotha/simpleswiss_weights_R6.txt"), "Not matching opengotha weights for round 6")
+ assertTrue(compare_games(games_np, Json.parse(pairings_R6.toString())!!.asArray()), "pairings for round 6 differ")
+ logger.info("Pairings for round 6 match OpenGotha")
+
+ firstGameID = (games_np.getJson(0)!!.asObject()["id"] as Long?)!!.toInt()
+ for (game_id in firstGameID..firstGameID+15) {
+ resp_np = TestAPI.put("/api/tour/$id_np/res/6", Json.parse("""{"id":$game_id,"result":"b"}""")).asObject()
+ assertTrue(resp_np.getBoolean("success") == true, "expecting success")
+ }
+ logger.info("Results succesfully entered for round 6")
+
}
}
\ No newline at end of file
diff --git a/api-webapp/src/test/resources/opengotha/tournamentfiles/simpleswiss_nopairings.xml b/api-webapp/src/test/resources/opengotha/tournamentfiles/simpleswiss_nopairings.xml
index 2fdbef0..4c0a310 100644
--- a/api-webapp/src/test/resources/opengotha/tournamentfiles/simpleswiss_nopairings.xml
+++ b/api-webapp/src/test/resources/opengotha/tournamentfiles/simpleswiss_nopairings.xml
@@ -14,11 +14,11 @@
-
+
-
+