Search in sources :

Example 1 with SolutionModel

use of easytests.core.models.SolutionModel in project easy-tests by malinink.

the class SolutionsServiceTest method createSolutionModel.

private SolutionModelInterface createSolutionModel(Integer id, Integer answerId, Integer pointId) {
    final SolutionModelInterface solutionModel = new SolutionModel();
    final AnswerModelInterface answerModel = mock(AnswerModelInterface.class);
    when(answerModel.getId()).thenReturn(answerId);
    final PointModelInterface pointModel = mock(PointModelInterface.class);
    when(pointModel.getId()).thenReturn(pointId);
    solutionModel.setId(id);
    solutionModel.setAnswer(answerModel);
    solutionModel.setPoint(pointModel);
    return solutionModel;
}
Also used : SolutionModelInterface(easytests.core.models.SolutionModelInterface) SolutionModel(easytests.core.models.SolutionModel) AnswerModelInterface(easytests.core.models.AnswerModelInterface) PointModelInterface(easytests.core.models.PointModelInterface)

Example 2 with SolutionModel

use of easytests.core.models.SolutionModel in project easy-tests by malinink.

the class SolutionsService method map.

private SolutionModelInterface map(SolutionEntity solutionEntity) {
    final SolutionModelInterface solutionModel = new SolutionModel();
    solutionModel.map(solutionEntity);
    return solutionModel;
}
Also used : SolutionModelInterface(easytests.core.models.SolutionModelInterface) SolutionModel(easytests.core.models.SolutionModel)

Example 3 with SolutionModel

use of easytests.core.models.SolutionModel in project easy-tests by malinink.

the class SolutionsServiceTest method mapSolutionModel.

private SolutionModelInterface mapSolutionModel(SolutionEntity solutionEntity) {
    final SolutionModelInterface solutionModel = new SolutionModel();
    solutionModel.map(solutionEntity);
    return solutionModel;
}
Also used : SolutionModelInterface(easytests.core.models.SolutionModelInterface) SolutionModel(easytests.core.models.SolutionModel)

Aggregations

SolutionModel (easytests.core.models.SolutionModel)3 SolutionModelInterface (easytests.core.models.SolutionModelInterface)3 AnswerModelInterface (easytests.core.models.AnswerModelInterface)1 PointModelInterface (easytests.core.models.PointModelInterface)1