Search in sources :

Example 6 with IssuesOptionsInterface

use of easytests.core.options.IssuesOptionsInterface in project easy-tests by malinink.

the class IssuesServiceTest method testFindAllWithOptions.

@Test
public void testFindAllWithOptions() throws Exception {
    final List<IssueEntity> issuesEntities = this.getIssuesEntities();
    final List<IssueModelInterface> issuesModels = this.getIssuesModels();
    final IssuesOptionsInterface issuesOptions = Mockito.mock(IssuesOptionsInterface.class);
    given(this.issuesMapper.findAll()).willReturn(issuesEntities);
    given(issuesOptions.withRelations(Mockito.anyList())).willReturn(issuesModels);
    final List<IssueModelInterface> foundedIssuesModels = this.issuesService.findAll(issuesOptions);
    verify(issuesOptions).withRelations(issuesModels);
    Assert.assertEquals(issuesModels, foundedIssuesModels);
}
Also used : IssuesOptionsInterface(easytests.core.options.IssuesOptionsInterface) IssueEntity(easytests.core.entities.IssueEntity) IssueModelInterface(easytests.core.models.IssueModelInterface)

Aggregations

IssueModelInterface (easytests.core.models.IssueModelInterface)6 IssuesOptionsInterface (easytests.core.options.IssuesOptionsInterface)6 IssueEntity (easytests.core.entities.IssueEntity)3 ArrayList (java.util.ArrayList)2 SubjectModelInterface (easytests.core.models.SubjectModelInterface)1