use of easytests.core.options.UsersOptions in project easy-tests by malinink.
the class ObjectsControllerTest method testViewReturnsData.
@Test
public void testViewReturnsData() throws Exception {
final UserModelInterface userModel = this.usersSupport.getModelFixtureMock(0);
when(this.usersOptionsBuilder.forAuth()).thenReturn(new UsersOptions());
when(this.usersService.find(any(Integer.class), any(UsersOptionsInterface.class))).thenReturn(userModel);
mvc.perform(get("/v1/objects/1/").contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk()).andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON)).andReturn();
}
use of easytests.core.options.UsersOptions in project easy-tests by malinink.
the class UsersOptionsBuilderTest method testForDelete.
@Test
public void testForDelete() throws Exception {
final SubjectsOptionsInterface subjectsOptions = new SubjectsOptions();
given(this.subjectsOptionsBuilder.forDelete()).willReturn(subjectsOptions);
final UsersOptionsInterface usersOptions = this.usersOptionsBuilder.forDelete();
Assert.assertEquals(new UsersOptions().withSubjects(subjectsOptions), usersOptions);
}
use of easytests.core.options.UsersOptions in project easy-tests by malinink.
the class UsersOptionsBuilderTest method testForAuth.
@Test
public void testForAuth() throws Exception {
final UsersOptionsInterface usersOptions = this.usersOptionsBuilder.forAuth();
Assert.assertEquals(new UsersOptions(), usersOptions);
}
Aggregations