@Before public void setUp() throws Exception { when(itemA.getIdentifier()).thenReturn("itemA"); when(itemB.getIdentifier()).thenReturn("itemB"); when(itemA.getAlias()).thenReturn("Item A"); when(itemB.getAlias()).thenReturn("Item B"); when(resourceService.getAllRepositories()).thenReturn(Arrays.asList(itemA, itemB)); searchService = new RepositorySearchServiceImpl(resourceService); }
@Before public void setUp() throws Exception { space = new Space("test-realm"); when(orgUnitService.getAllUserSpaces()).thenReturn(Collections.singletonList(space)); when(itemA.getIdentifier()).thenReturn("itemA"); when(itemB.getIdentifier()).thenReturn("itemB"); when(itemA.getAlias()).thenReturn("Item A"); when(itemB.getAlias()).thenReturn("Item B"); when(resourceService.getAllRepositories(space)).thenReturn(Arrays.asList(itemA, itemB)); searchService = new RepositorySearchServiceImpl(resourceService, orgUnitService); }
@Before public void setUp() throws Exception { space = new Space("test-realm"); when(orgUnitService.getAllUserSpaces()).thenReturn(Collections.singletonList(space)); when(itemA.getIdentifier()).thenReturn("itemA"); when(itemB.getIdentifier()).thenReturn("itemB"); when(itemA.getAlias()).thenReturn("Item A"); when(itemB.getAlias()).thenReturn("Item B"); when(resourceService.getAllRepositories(space)).thenReturn(Arrays.asList(itemA, itemB)); searchService = new RepositorySearchServiceImpl(resourceService, orgUnitService); }