This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit e3530f3e authored by Eduard Frankford's avatar Eduard Frankford
Browse files

little improvements

parent 160583a8
Branches
Tags
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -61,7 +61,6 @@ public class StatisticsResourceIT {
private static final Integer UPDATED_DOWNLOADS = 2;
private static final String DEFAULT_EXERCISE_ID = "1";
private static final String UPDATED_EXERCISE_ID = "2";
final String publicGitLabProjectId = "3";
......@@ -124,17 +123,6 @@ public class StatisticsResourceIT {
return statistics;
}
/**
* Create an updated entity for this test.
*
* This is a static method, as tests for other entities might also need it, if
* they test an entity which requires the current entity.
*/
public static Statistics createUpdatedEntity(EntityManager em) {
Statistics statistics = new Statistics().views(UPDATED_VIEWS).downloads(UPDATED_DOWNLOADS).exerciseID(UPDATED_EXERCISE_ID);
return statistics;
}
@BeforeEach
public void initTest() {
statistics = createEntity(em);
......@@ -259,7 +247,7 @@ public class StatisticsResourceIT {
// Disconnect from session so that the updates on updatedStatistics are not
// directly saved in db
em.detach(updatedStatistics);
updatedStatistics.views(UPDATED_VIEWS).downloads(UPDATED_DOWNLOADS).exerciseID(UPDATED_EXERCISE_ID);
updatedStatistics.views(UPDATED_VIEWS).downloads(UPDATED_DOWNLOADS).exerciseID(DEFAULT_EXERCISE_ID);
StatisticsDTO statisticsDTO = statisticsMapper.toDto(updatedStatistics);
restStatisticsMockMvc
......@@ -277,7 +265,7 @@ public class StatisticsResourceIT {
Statistics testStatistics = statisticsList.get(statisticsList.size() - 1);
assertThat(testStatistics.getViews()).isEqualTo(UPDATED_VIEWS);
assertThat(testStatistics.getDownloads()).isEqualTo(UPDATED_DOWNLOADS);
assertThat(testStatistics.getExerciseID()).isEqualTo(UPDATED_EXERCISE_ID);
assertThat(testStatistics.getExerciseID()).isEqualTo(DEFAULT_EXERCISE_ID);
}
@Test
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment