Search in sources :

Example 1 with IssueStandardQuestionTypeOptionsOptionsInterface

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

the class IssueStandardQuestionTypeOptionsServiceTest method testSaveModelsListWithOptions.

@Test
public void testSaveModelsListWithOptions() throws Exception {
    final ArgumentCaptor<IssueStandardQuestionTypeOptionModelInterface> questionTypeOptionModelCaptor = ArgumentCaptor.forClass(IssueStandardQuestionTypeOptionModelInterface.class);
    final List<IssueStandardQuestionTypeOptionModelInterface> questionTypeOptionModels = this.getQuestionTypeOptionFixturesModels();
    final IssueStandardQuestionTypeOptionsOptionsInterface questionTypeOptionsOptions = Mockito.mock(IssueStandardQuestionTypeOptionsOptionsInterface.class);
    this.questionTypeOptionsService.save(questionTypeOptionModels, questionTypeOptionsOptions);
    this.assertServicesSet(questionTypeOptionsOptions, questionTypeOptionModels.size());
    verify(questionTypeOptionsOptions, times(questionTypeOptionModels.size())).saveWithRelations(questionTypeOptionModelCaptor.capture());
    this.questionTypeOptionsSupport.assertModelsListEquals(questionTypeOptionModels, questionTypeOptionModelCaptor.getAllValues());
    verifyNoMoreInteractions(this.questionTypeOptionsMapper);
}
Also used : IssueStandardQuestionTypeOptionModelInterface(easytests.core.models.IssueStandardQuestionTypeOptionModelInterface) IssueStandardQuestionTypeOptionsOptionsInterface(easytests.core.options.IssueStandardQuestionTypeOptionsOptionsInterface)

Example 2 with IssueStandardQuestionTypeOptionsOptionsInterface

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

the class IssueStandardQuestionTypeOptionsOptionsBuilderTest method testForAuth.

@Test
public void testForAuth() throws Exception {
    final IssueStandardsOptionsInterface issueStandardsOptions = new IssueStandardsOptions();
    given(this.issueStandardsOptionsBuilder.forAuth()).willReturn(issueStandardsOptions);
    final IssueStandardQuestionTypeOptionsOptionsInterface questionTypeOptionsOptions = this.questionTypeOptionsOptionsBuilder.forAuth();
    Assert.assertEquals(new IssueStandardQuestionTypeOptionsOptions().withIssueStandard(issueStandardsOptions), questionTypeOptionsOptions);
}
Also used : IssueStandardQuestionTypeOptionsOptions(easytests.core.options.IssueStandardQuestionTypeOptionsOptions) IssueStandardsOptionsInterface(easytests.core.options.IssueStandardsOptionsInterface) IssueStandardQuestionTypeOptionsOptionsInterface(easytests.core.options.IssueStandardQuestionTypeOptionsOptionsInterface) IssueStandardsOptions(easytests.core.options.IssueStandardsOptions) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) Test(org.junit.Test)

Example 3 with IssueStandardQuestionTypeOptionsOptionsInterface

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

the class IssueStandardQuestionTypeOptionsOptionsBuilderTest method testForDelete.

@Test
public void testForDelete() throws Exception {
    final IssueStandardQuestionTypeOptionsOptionsInterface questionTypeOptionsOptions = this.questionTypeOptionsOptionsBuilder.forDelete();
    Assert.assertEquals(new IssueStandardQuestionTypeOptionsOptions(), questionTypeOptionsOptions);
}
Also used : IssueStandardQuestionTypeOptionsOptions(easytests.core.options.IssueStandardQuestionTypeOptionsOptions) IssueStandardQuestionTypeOptionsOptionsInterface(easytests.core.options.IssueStandardQuestionTypeOptionsOptionsInterface) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) Test(org.junit.Test)

Example 4 with IssueStandardQuestionTypeOptionsOptionsInterface

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

the class IssueStandardQuestionTypeOptionsServiceTest method testSaveWithOptions.

@Test
public void testSaveWithOptions() throws Exception {
    final IssueStandardQuestionTypeOptionsOptionsInterface questionTypeOptionsOptions = Mockito.mock(IssueStandardQuestionTypeOptionsOptionsInterface.class);
    final IssueStandardQuestionTypeOptionModelInterface questionTypeOptionModel = Models.createQuestionTypeOptionModel(1, 2, 10, 20, 60, 2);
    this.questionTypeOptionsService.save(questionTypeOptionModel, questionTypeOptionsOptions);
    verify(questionTypeOptionsOptions).saveWithRelations(questionTypeOptionModel);
}
Also used : IssueStandardQuestionTypeOptionModelInterface(easytests.core.models.IssueStandardQuestionTypeOptionModelInterface) IssueStandardQuestionTypeOptionsOptionsInterface(easytests.core.options.IssueStandardQuestionTypeOptionsOptionsInterface) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 5 with IssueStandardQuestionTypeOptionsOptionsInterface

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

the class IssueStandardQuestionTypeOptionsServiceTest method testDeleteWithOptions.

@Test
public void testDeleteWithOptions() throws Exception {
    final IssueStandardQuestionTypeOptionsOptionsInterface questionTypeOptionsOptions = Mockito.mock(IssueStandardQuestionTypeOptionsOptionsInterface.class);
    final IssueStandardQuestionTypeOptionModelInterface questionTypeOptionModel = Models.createQuestionTypeOptionModel(1, 1, 10, 20, 60, 1);
    this.questionTypeOptionsService.delete(questionTypeOptionModel, questionTypeOptionsOptions);
    verify(questionTypeOptionsOptions).deleteWithRelations(questionTypeOptionModel);
}
Also used : IssueStandardQuestionTypeOptionModelInterface(easytests.core.models.IssueStandardQuestionTypeOptionModelInterface) IssueStandardQuestionTypeOptionsOptionsInterface(easytests.core.options.IssueStandardQuestionTypeOptionsOptionsInterface) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Aggregations

IssueStandardQuestionTypeOptionsOptionsInterface (easytests.core.options.IssueStandardQuestionTypeOptionsOptionsInterface)11 IssueStandardQuestionTypeOptionModelInterface (easytests.core.models.IssueStandardQuestionTypeOptionModelInterface)9 Test (org.junit.Test)9 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)9 IssueStandardQuestionTypeOptionEntity (easytests.core.entities.IssueStandardQuestionTypeOptionEntity)3 IssueStandardQuestionTypeOptionsOptions (easytests.core.options.IssueStandardQuestionTypeOptionsOptions)2 IssueStandardsOptions (easytests.core.options.IssueStandardsOptions)1 IssueStandardsOptionsInterface (easytests.core.options.IssueStandardsOptionsInterface)1 ArrayList (java.util.ArrayList)1