Skip to content

Commit

Permalink
Merge pull request #168 from Arquisoft/unitTests
Browse files Browse the repository at this point in the history
Unit tests
  • Loading branch information
Pelayori authored Apr 6, 2024
2 parents e7e1c19 + 93b8190 commit 73f6e7d
Show file tree
Hide file tree
Showing 3 changed files with 428 additions and 4 deletions.
8 changes: 7 additions & 1 deletion src/main/java/com/uniovi/entities/Associations.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,16 @@ public static void addAnswer(Question question, List<Answer> answer) {
* @param answer The answer
*/
public static void removeAnswer(Question question, List<Answer> answer) {
question.getOptions().remove(answer);
question.getOptions().removeAll(answer);
for (Answer a : answer) {
a.setQuestion(null);
}
}
//public static void removeAnswer(Question question, List<Answer> answer) {
// question.getOptions().remove(answer);
//for (Answer a : answer) {
// a.setQuestion(null);
//}
//}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class InsertSampleDataService {
private final GameSessionRepository gameSessionRepository;
private Environment environment;

private Logger log = LoggerFactory.getLogger(InsertSampleDataService.class);;
private Logger log = LoggerFactory.getLogger(InsertSampleDataService.class);

public InsertSampleDataService(PlayerService playerService, QuestionService questionService,
CategoryService categoryService, QuestionRepository questionRepository,
Expand Down
Loading

0 comments on commit 73f6e7d

Please sign in to comment.