use of ca.corefacility.bioinformatics.irida.service.user.UserService in project irida by phac-nml.
the class AnnouncementsControllerTest method setUp.
@Before
public void setUp() {
userService = mock(UserService.class);
announcementService = mock(AnnouncementService.class);
announcementsController = new AnnouncementsController(userService, announcementService);
user = new User("testme", "test@me.com", "aaa", "John", "Curatcha", "2222222");
Announcement a1 = new Announcement("First message", user);
Announcement a2 = new Announcement("Second message", user);
announcementList = Lists.newArrayList(a1, a2);
AnnouncementUserJoin auj1 = new AnnouncementUserJoin(a1, user);
AnnouncementUserJoin auj2 = new AnnouncementUserJoin(a2, user);
announcementUserList = Lists.newArrayList(auj1, auj2);
}
use of ca.corefacility.bioinformatics.irida.service.user.UserService in project irida by phac-nml.
the class UserControllerTest method setUp.
@Before
public void setUp() {
userService = mock(UserService.class);
projectService = mock(ProjectService.class);
controller = new RESTUsersController(userService, projectService);
// fake out the servlet response so that the URI builder will work.
RequestAttributes ra = new ServletRequestAttributes(new MockHttpServletRequest());
RequestContextHolder.setRequestAttributes(ra);
}
Aggregations