package jfdi.test.ui;

import jfdi.ui.Constants;

public class TestMark extends UiTest {

    TestMark(TestMain main) {
        super(main);
    }

    @Override
    void run() {
        main.addRandomTasks(10);
        testMarkSingle();
        testMarkMultiple();
        testMarkNonExistent();
    }

    private void testMarkSingle() {
        main.execute("mark 1");
        assertMarked(1);
    }

    private void testMarkMultiple() {
        main.execute("mark 8,9");
        assertMarked(8, 9);
    }

    private void testMarkNonExistent() {
        int taskId = 999;
        main.execute(String.format("mark %d", taskId));
        main.assertErrorMessage(String.format(Constants.CMD_ERROR_CANT_MARK_NO_ID, taskId));
    }

    private void assertMarked(int... ids) {
        // TODO: Assert that the given IDs are marked
    }

}

@@ -16,16 +16,58 @@
 st.ui;%0A%0A
+import javafx.collections.ObservableList;%0A
 import j
@@ -825,53 +825,229 @@
     
-// TODO: Assert that the given IDs are marked
+for (int id : ids) %7B%0A            getStyleClass(id).contains(%22itemBoxDone%22);%0A        %7D%0A    %7D%0A%0A    private ObservableList%3CString%3E getStyleClass(int id) %7B%0A        return main.controller.importantList.get(id).getStyleClass();
 %0A   

Complete TestMark