コード例 #1
0
 public void OperationScheduleParseTest()
 {
     testCmdParser = new CommandParser();
     Operation op1 = testCmdParser.ParseOperation("task  jan 15th midnight - jan 30th morning schedule 3000 hours");
     Assert.AreEqual("ToDo.OperationSchedule", op1.GetType().ToString());
     return;
 }
コード例 #2
0
 public void OperationSearchDeadlineParseTest()
 {
     testCmdParser = new CommandParser();
     Operation op1 = testCmdParser.ParseOperation("search by 2013 oct 30th 5:49 pm");
     Assert.AreEqual("ToDo.OperationSearch", op1.GetType().ToString());
     return;
 }
コード例 #3
0
        public void OperationTimedParseTest()
        {
            testCmdParser = new CommandParser();
            Operation op1 = testCmdParser.ParseOperation("task do stuff add sunday morning to wed 13:20 ");
            Assert.AreEqual("ToDo.OperationAdd", op1.GetType().ToString());

            return;
        }
コード例 #4
0
 public void OperationInvalidParseTest()
 {
     testCmdParser = new CommandParser();
     bool flag = false;
     try
     {
         testCmdParser.ParseOperation("add delete modify");
     }
     catch (MultipleCommandsException)
     {
         flag = true;
     }
     Assert.IsTrue(flag);
     return;
 }
コード例 #5
0
ファイル: Logic.cs プロジェクト: soulslicer/ToDoPlusPlus
        /// <summary>
        /// Constructor for Logic class. Initializes all necessary components.
        /// </summary>
        public Logic()
        {
            mainSettings = new Settings();

            storage = new Storage("ToDo++.xml", "ToDoSettings.xml");

            mainSettings.UpdateSettings(storage.LoadSettingsFromFile());
            EventHandlers.UpdateSettingsHandler += UpdateSettings;

            commandParser = new CommandParser();

            taskList = storage.LoadTasksFromFile();
            while (taskList == null)
            {
                PromptUser_CreateNewTaskFile();
                taskList = storage.LoadTasksFromFile();
            }
        }