@@ -0,0 +1,3228 @@
+package seedu.address.model;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0A%0Aimport java.util.Collection;%0Aimport java.util.Collections;%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.ExpectedException;%0Aimport seedu.address.testutil.TypicalTestTasks;%0A%0Apublic class ModelManagerTest %7B%0A    %0A    @Rule%0A    public ExpectedException thrown = ExpectedException.none();%0A    %0A    private ModelManager modelManager = new ModelManager();%0A    private final TypicalTestTasks testUtil = new TypicalTestTasks();%0A    %0A    @Test%0A    public void constructor() %7B%0A        assertEquals(Collections.emptyList(), modelManager.getFilteredTaskList());%0A        assertEquals(Collections.emptyList(), modelManager.getFilteredListList());%0A    %7D%0A    %0A    @Test%0A    public void resetData_null_throwsAssertionError() %7B%0A        thrown.expect(AssertionError.class);%0A        modelManager.resetData(null);%0A    %7D%0A    %0A    @Test%0A    public void resetData() %7B%0A        modelManager.resetData(testUtil.getTypicalTaskManager());%0A        assertEquals(modelManager.getTaskManager(), testUtil.getTypicalTaskManager());%0A        assertEquals(modelManager.getFilteredTaskList().size(), 2);%0A        assertEquals(modelManager.getFilteredListList().size(), 2);%0A    %7D%0A%0A    @Test%0A    public void testFilterName() %7B%0A        modelManager.resetData(testUtil.getTypicalTaskManager());%0A        Set%3CString%3E keywords = new HashSet%3CString%3E();%0A        keywords.add(%22Gym%22);%0A        modelManager.updateFilteredTaskList(keywords);%0A        assertEquals(modelManager.getFilteredTaskList().size(), 1);%0A        assertEquals(modelManager.getFilteredTaskList().get(0).getName().fullName, %22gym%22);%0A        %0A        modelManager = new ModelManager();%0A        modelManager.resetData(testUtil.getTypicalTaskManager());%0A        keywords.add(%22cs2103%22);%0A        modelManager.updateFilteredTaskList(keywords);%0A        assertEquals(modelManager.getFilteredTaskList().size(), 2);%0A    %7D%0A    %0A    @Test%0A    public void testFilterTag() %7B%0A        modelManager.resetData(testUtil.getTypicalTaskManager());%0A        assertEquals(modelManager.getFilteredTaskList().size(), 2);%0A        Set%3CString%3E keywords = new HashSet%3CString%3E();%0A        keywords.add(%22personal%22);%0A        modelManager.updateFilteredTaskListGivenListName(keywords);%0A        assertEquals(modelManager.getFilteredTaskList().size(), 1);%0A        assertEquals(modelManager.getFilteredTaskList().get(0).getName().fullName, %22gym%22);%0A        %0A        modelManager = new ModelManager();%0A        modelManager.resetData(testUtil.getTypicalTaskManager());%0A        keywords.clear();%0A        keywords.add(%22School%22);%0A        modelManager.updateFilteredTaskListGivenListName(keywords);%0A        assertEquals(modelManager.getFilteredTaskList().size(), 1);%0A        assertEquals(modelManager.getFilteredTaskList().get(0).getName().fullName, %22cs2103%22);%0A        %0A        modelManager = new ModelManager();%0A        modelManager.resetData(testUtil.getTypicalTaskManager());%0A        keywords.clear();%0A        keywords.add(%22inbox%22);%0A        modelManager.updateFilteredTaskList(keywords);%0A        assertEquals(modelManager.getFilteredTaskList().size(), 0);%0A    %7D%0A%7D%0A

Test ModelManager with task-level method