<commit_before>package seedu.taskman.logic.logicmanager;

import org.junit.Ignore;
import org.junit.Test;
import seedu.taskman.logic.commands.CommandResult;
import seedu.taskman.model.TaskMan;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;

//@@author A0139019E
public class UndoTests extends LogicManagerTestBase {

    //TODO: change hardcoded add commands to generated ones
    @Test
    public void execute_undoNothingToUndo_failure() {
        assertTrue(!logic.execute("undo").succeeded);
    }

    @Test
    public void execute_undoWithoutIndexAfterSingleCommand_success() throws Exception {
        TaskMan before = new TaskMan(model.getTaskMan());
        assertExecuteCommandWithStateChange("add something");
        assertExecuteCommandWithStateChange("undo");
        assertEquals("failed to undo", before, model.getTaskMan());
    }<commit_msg>Cleaned up todos for Undo Command<commit_after>package seedu.taskman.logic.logicmanager;

import org.junit.Test;
import seedu.taskman.logic.commands.CommandResult;
import seedu.taskman.model.TaskMan;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;

//@@author A0139019E
public class UndoTests extends LogicManagerTestBase {

    @Test
    public void execute_undoNothingToUndo_failure() {
        assertTrue(!logic.execute("undo").succeeded);
    }

    @Test
    public void execute_undoWithoutIndexAfterSingleCommand_success() throws Exception {
        TaskMan before = new TaskMan(model.getTaskMan());
        assertExecuteCommandWithStateChange("add something");
        assertExecuteCommandWithStateChange("undo");
        assertEquals("failed to undo", before, model.getTaskMan());
    }
{'fraction_non_alphanumeric': 0.0939377389404697, 'fraction_numerical': 0.007646095030038231, 'mean_word_length': 4.725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2274832', 'n_tokens_mistral': 519, 'n_tokens_neox': 492, 'n_words': 109}