diff --git a/core/src/main/java/pl/wmsdev/usos4j/api/grades/UsosGradesAPI.java b/core/src/main/java/pl/wmsdev/usos4j/api/grades/UsosGradesAPI.java index 9921cca..cf7c9e0 100644 --- a/core/src/main/java/pl/wmsdev/usos4j/api/grades/UsosGradesAPI.java +++ b/core/src/main/java/pl/wmsdev/usos4j/api/grades/UsosGradesAPI.java @@ -75,7 +75,7 @@ public List latest(UsosLatestParam params) { } @SuppressWarnings("unchecked") - public Map terms2(UsosGradesTermsParam params) { + public Map> terms2(UsosGradesTermsParam params) { return requestWithAccessToken(requestFactory.get( "services/grades/terms2", params, FieldSelector.fromRequest(UsosGrade.class) diff --git a/core/src/main/java/pl/wmsdev/usos4j/model/grades/UsosGradesCourseEdition.java b/core/src/main/java/pl/wmsdev/usos4j/model/grades/UsosGradesCourseEdition.java index 24c187c..ad05b6c 100644 --- a/core/src/main/java/pl/wmsdev/usos4j/model/grades/UsosGradesCourseEdition.java +++ b/core/src/main/java/pl/wmsdev/usos4j/model/grades/UsosGradesCourseEdition.java @@ -4,5 +4,5 @@ import java.util.Map; -public record UsosGradesCourseEdition(UsosGradesExam[] courseGrades, Map courseUnitsGrades) implements UsosObject { +public record UsosGradesCourseEdition(Map[] courseGrades, Map courseUnitsGrades) implements UsosObject { } diff --git a/integration-tests/src/test/java/pl/wmsdev/UsosGradesAPITest.java b/integration-tests/src/test/java/pl/wmsdev/UsosGradesAPITest.java index dc84609..57ac10e 100644 --- a/integration-tests/src/test/java/pl/wmsdev/UsosGradesAPITest.java +++ b/integration-tests/src/test/java/pl/wmsdev/UsosGradesAPITest.java @@ -4,13 +4,17 @@ import org.junit.jupiter.api.Test; import pl.wmsdev.usos4j.model.grades.*; +import java.util.Arrays; + import static org.junit.jupiter.api.Assertions.assertThrows; public class UsosGradesAPITest extends UsosAPIBaseTest { @Test void courseEdition2() { - log(userApi.grades().courseEdition2(UsosGradesCourseEditionParams.builder("W13IST-SI0002G", "2023/24-Z").build())); + var result = userApi.grades().courseEdition2(UsosGradesCourseEditionParams.builder("W13IST-SI0002G", "2023/24-Z").build()); + log("result: " + result); + log("grade: " + Arrays.toString(result.courseGrades())); } @Test