<commit_before>package fini.main.tests;

import fini.main.model.*;
import fini.main.model.Command.CommandType;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

import org.junit.Before;
import org.junit.After;
import org.junit.Test;

public class CommandTest {
	
	private static final String PASS = new String("PASS");
	private static final String FAIL = new String("FAIL");

	Command addCommand;
	Command deleteCommand;
	Command deleteInvalidCommand;
	Command updateCommand;
	Command clearCommand;
	Command exitCommand;
	int result;
	
	
	@Before
	public void initialize() {
		addCommand = new Command("add task");
		deleteInvalidCommand = new Command("delete task");
		deleteCommand = new Command("delete 1");
		updateCommand = new Command("update 1");
		clearCommand = new Command("clear");
		exitCommand = new Command("exit");
	}
	
	static public String test(int value) {
		if (value == 1)
			return PASS;
		else
			return FAIL;
	}
	
	@Test
	public void testAddCommand() {
		assertEquals("ADD", addCommand.getCommandType().toString());
	}
	
	@Test
	public void testDeleteInvalidCommand() {
		assertEquals("INVALID", deleteInvalidCommand.getCommandType().toString());
	}
	
	@Test
	public void testDeleteCommand() {
		assertEquals("DELETE", deleteCommand.getCommandType().toString());
	}
	
	@Test
	public void testUpdateCommand() {
		assertEquals("UPDATE", updateCommand.getCommandType().toString());
	}
	
	@Test
	public void testClearCommand() {
		assertEquals("CLEAR", clearCommand.getCommandType().toString());
	}
	
	@Test
	public void testExitCommand() {
		assertEquals("EXIT", exitCommand.getCommandType().toString());
	}

}<commit_msg>Added testUndoCommand unit test<commit_after>package fini.main.tests;

import fini.main.model.*;
import fini.main.model.Command.CommandType;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

import org.junit.Before;
import org.junit.After;
import org.junit.Test;

public class CommandTest {
	
	private static final String PASS = new String("PASS");
	private static final String FAIL = new String("FAIL");

	Command addCommand;
	Command deleteCommand;
	Command deleteInvalidCommand;
	Command updateCommand;
	Command clearCommand;
	Command exitCommand;
	Command undoCommand;
	int result;
	
	
	@Before
	public void initialize() {
		addCommand = new Command("add task");
		deleteInvalidCommand = new Command("delete task");
		deleteCommand = new Command("delete 1");
		updateCommand = new Command("update 1");
		clearCommand = new Command("clear");
		exitCommand = new Command("exit");
		undoCommand = new Command("undo");
	}
	
	static public String test(int value) {
		if (value == 1)
			return PASS;
		else
			return FAIL;
	}
	
	@Test
	public void testAddCommand() {
		assertEquals("ADD", addCommand.getCommandType().toString());
	}
	
	@Test
	public void testDeleteInvalidCommand() {
		assertEquals("INVALID", deleteInvalidCommand.getCommandType().toString());
	}
	
	@Test
	public void testDeleteCommand() {
		assertEquals("DELETE", deleteCommand.getCommandType().toString());
	}
	
	@Test
	public void testUpdateCommand() {
		assertEquals("UPDATE", updateCommand.getCommandType().toString());
	}
	
	@Test
	public void testClearCommand() {
		assertEquals("CLEAR", clearCommand.getCommandType().toString());
	}
	
	@Test
	public void testExitCommand() {
		assertEquals("EXIT", exitCommand.getCommandType().toString());
	}
	
	@Test
	public void testUndoCommand() {
		assertEquals("UNDO", undoCommand.getCommandType().toString());
	}

}
{'fraction_non_alphanumeric': 0.12327610470025331, 'fraction_numerical': 0.0016887137630171687, 'mean_word_length': 5.127586206896551, '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': '3814799', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1002, 'n_words': 262}