Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/test/java/easytests/core/options/AnswersOptionsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import easytests.core.models.*;
import easytests.core.models.empty.QuestionModelEmpty;
import easytests.core.services.AnswersServiceInterface;
import easytests.core.services.QuestionsServiceInterface;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -116,7 +117,32 @@ public void testWithRelationsOnModelsList() throws Exception {

verify(answersModels.get(1)).setQuestion(questionModelSecond);
}
@Test
public void testSaveWithRelations() throws Exception {

final AnswerModelInterface answerModel = Mockito.mock(AnswerModelInterface.class);

final AnswersOptionsInterface answersOptions = new AnswersOptions();

answersOptions.saveWithRelations(answerModel);


}

@Test
public void testDeleteWithRelations() throws Exception {

final AnswerModelInterface answerModel = Mockito.mock(AnswerModelInterface.class);

final AnswersServiceInterface answersService = Mockito.mock(AnswersServiceInterface.class);
final AnswersOptionsInterface answersOptions = new AnswersOptions();
answersOptions.setAnswersService(answersService);
answersOptions.deleteWithRelations(answerModel);
verify(answersService).delete(answerModel);



}
@Test
public void testSaveDeleteWithQuestion() {

Expand Down