use of org.haiku.haikudepotserver.dataobjects.UserRatingStability in project haikudepotserver by haiku.
the class MiscelaneousApiIT method testGetAllUserRatingStabilities.
@Test
public void testGetAllUserRatingStabilities() {
// ------------------------------------
GetAllUserRatingStabilitiesResult result = miscellaneousApi.getAllUserRatingStabilities(new GetAllUserRatingStabilitiesRequest());
// ------------------------------------
ObjectContext objectContext = serverRuntime.newContext();
List<UserRatingStability> userRatingStabilities = UserRatingStability.getAll(objectContext);
Assertions.assertThat(userRatingStabilities.size()).isEqualTo(result.userRatingStabilities.size());
for (int i = 0; i < userRatingStabilities.size(); i++) {
UserRatingStability userRatingStability = userRatingStabilities.get(i);
GetAllUserRatingStabilitiesResult.UserRatingStability apiUserRatingStability = result.userRatingStabilities.get(i);
Assertions.assertThat(userRatingStability.getCode()).isEqualTo(apiUserRatingStability.code);
Assertions.assertThat(userRatingStability.getName()).isEqualTo(apiUserRatingStability.name);
}
}
Aggregations