Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
Pelayori committed Apr 28, 2024
1 parent 8f0dea4 commit 3928c89
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/test/java/com/uniovi/Wiq_UnitTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -1918,28 +1918,4 @@ private JSONObject parseJsonResponse(HttpResponse<String> response) throws JSONE
private void insertSomeQuestions() throws IOException, InterruptedException {
questionGeneratorService.generateTestQuestions();
}

public List<Question> testQuestions(int num) {
List<Question> res = new ArrayList<>();
Category c = new Category("Test category", "Test category");
categoryService.addNewCategory(c);
for (int i = 0; i < num; i++) {
Question q = new Question();
q.setStatement("Test question " + i);
q.setLanguage("es");
Associations.QuestionsCategory.addCategory(q, c);
List<Answer> answers = new ArrayList<>();
for (int j = 0; j < 4; j++) {
Answer a = new Answer();
a.setText("Test answer " + j);
a.setCorrect(j == 0);
if(j==0) q.setCorrectAnswer(a);
answers.add(a);
}
Associations.QuestionAnswers.addAnswer(q, answers);
questionService.addNewQuestion(q);
res.add(q);
}
return res;
}
}

0 comments on commit 3928c89

Please sign in to comment.