package guitests;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

import seedu.task.model.TaskManager;
import seedu.task.model.task.Task;
import seedu.task.model.util.SampleDataUtil;
import seedu.task.testutil.TestUtil;

public class SampleDataTest extends TaskManagerGuiTest {
    @Override
    protected TaskManager getInitialData() {
        // return null to force test app to load data from file only
        return null;
    }

    @Override
    protected String getDataFileLocation() {
        // return a non-existent file location to force test app to load sample data
        return TestUtil.getFilePathInSandboxFolder("SomeFileThatDoesNotExist1234567890.xml");
    }

    @Test
    public void taskManager_dataFileDoesNotExist_loadSampleData() throws Exception {
        Task[] expectedList = SampleDataUtil.getSampleTasks();
        assertTrue(taskListPanel.isListMatching(expectedList));
    }
}

@@ -67,22 +67,124 @@
 ort 
-org.junit.Test
+java.io.File;%0A%0Aimport org.junit.Test;%0Aimport org.ocpsoft.prettytime.shade.edu.emory.mathcs.backport.java.util.Arrays
 ;%0A%0Ai
@@ -953,16 +953,51 @@
 asks();%0A
+        Arrays.sort(expectedList);%0A
         
@@ -1052,16 +1052,218 @@
 List));%0A
+        %0A        //clean up%0A        File toDelete = new File(TestUtil.getFilePathInSandboxFolder(%22SomeFileThatDoesNotExist1234567890.xml%22));%0A        assert toDelete.exists();%0A        toDelete.delete();%0A
     %7D%0A%7D%0A

fix SampleDataTest