Search in sources :

Example 1 with IssueModel

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

the class IssuesServiceTest method mapIssueModel.

private IssueModelInterface mapIssueModel(IssueEntity issueEntity) {
    final IssueModelInterface issueModel = new IssueModel();
    issueModel.map(issueEntity);
    return issueModel;
}
Also used : IssueModelInterface(easytests.core.models.IssueModelInterface) IssueModel(easytests.core.models.IssueModel)

Example 2 with IssueModel

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

the class IssuesService method map.

private IssueModelInterface map(IssueEntity issueEntity) {
    if (issueEntity == null) {
        return null;
    }
    final IssueModelInterface issueModel = new IssueModel();
    issueModel.map(issueEntity);
    return issueModel;
}
Also used : IssueModelInterface(easytests.core.models.IssueModelInterface) IssueModel(easytests.core.models.IssueModel)

Example 3 with IssueModel

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

the class IssuesServiceTest method testSaveModel.

@Test
public void testSaveModel() throws Exception {
    final IssueModelInterface issueModel = new IssueModel();
    issueModel.setName("test111");
    issueModel.setQuizzes(new ModelsListEmpty());
    issueModel.setSubject(new SubjectModelEmpty(1));
    this.issuesService.save(issueModel);
    final IssueModelInterface foundIssueModel = this.issuesService.find(issueModel.getId());
    Assert.assertEquals(issueModel, foundIssueModel);
}
Also used : SubjectModelEmpty(easytests.core.models.empty.SubjectModelEmpty) ModelsListEmpty(easytests.core.models.empty.ModelsListEmpty) IssueModelInterface(easytests.core.models.IssueModelInterface) IssueModel(easytests.core.models.IssueModel) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Aggregations

IssueModel (easytests.core.models.IssueModel)3 IssueModelInterface (easytests.core.models.IssueModelInterface)3 ModelsListEmpty (easytests.core.models.empty.ModelsListEmpty)1 SubjectModelEmpty (easytests.core.models.empty.SubjectModelEmpty)1 Test (org.junit.Test)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1