@Test public void askMoveDestination() { when(roleManager.getCanMoveTopics()).thenReturn(true); when(categoryRepository.getAllCategories()).thenReturn(new ArrayList<Category>()); controller.askMoveDestination("return path", 10, 1, 2, 3); assertArrayEquals(new int[] {1, 2, 3}, (int[]) mockResult.included("topicIds")); assertEquals(10, mockResult.included("fromForumId")); assertEquals("return path", mockResult.included("returnUrl")); assertEquals(new ArrayList<Category>(), mockResult.included("categories")); }
@Test public void testeLista() { questoesController.lista(); List<Questao> questoes = result.included("lista"); assertNotNull(questoes); }