package guitests;

import static org.junit.Assert.assertTrue;
import java.io.File;
import org.junit.Test;

import seedu.tasklist.commons.core.Config;
import seedu.tasklist.commons.core.Messages;
import seedu.tasklist.logic.commands.StorageCommand;
import seedu.tasklist.storage.Storage;

public class StorageCommandTest extends TaskListGuiTest {

	private String testStorageCommandFilePath = "src/test/data/StorageCommandTestFolder/testTaskList.xml";
	private String testFileName = "testTaskList.xml";
	private final String COMMAND_WORD = "storage ";
	private String defaultFilePath = "src/test/data/sandbox/tempTaskList.xml";
	private String defaultConfigFile = "src/test/data/ConfigUtilTest/TestConfig.json";
	

	private Config config;
	private Storage storage;
	
	/*@Before
	 public void setup(){
		config.setTaskListFilePath(defaultFilePath);
		try {
			ConfigUtil.saveConfig(config, defaultConfigFile);
		} catch (IOException e) {
			e.printStackTrace();
		}
		 storage.setTaskListFilePath(defaultFilePath);
	}
*/
	/*// Change File path
	@Test
	public void ChangeFilePath() {

		assertFilePathChange(COMMAND_WORD + testStorageCommandFilePath, getPath(testStorageCommandFilePath));
	}*/

	// Invalid Command
	@Test
	public void invalidStorageCommand() {
		commandBox.runCommand("storages docs/");
		assertResultMessage(Messages.MESSAGE_UNKNOWN_COMMAND);
	}

	// Invalid file Path
	@Test
	public void invalidFilePath() {
		commandBox.runCommand("storage doc");
		assertResultMessage(StorageCommand.MESSAGE_FILE_PATH_NOT_EXIST);
	}

	public String getPath(String filepath) {
		File file = new File(filepath);
		String fileName = file.getName().toString();
		return fileName;
	}

	private void assertFilePathChange(String filepath, String fileName) {
		commandBox.runCommand(filepath);
		assertTrue(fileName.equals(testFileName));
	}
}
@@ -281,16 +281,37 @@
 orage;%0A%0A
+//@@author A0138516A%0A
 public c

update Method Test Comment