public void evalTestEval() { Parser_Accessor target = new Parser_Accessor(); // TODO: Initialize to an appropriate value List<Token_Accessor> ExprCopy = null; // TODO: Initialize to an appropriate value double expected = 0F; // TODO: Initialize to an appropriate value double actual; actual = target.eval(ExprCopy); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void combineDateTimeTest() { Parser_Accessor target = new Parser_Accessor(); string input = Utility.TEST_PARSER_TASK_ALL; target.combineDateTime(input); string expected=Utility.TEST_PARSER_START; string actual =target.start+" "; Assert.AreEqual(expected, actual); expected = Utility.TEST_PARSER_END; actual = target.end + " "; Assert.AreEqual(expected, actual); }
public void DayToDateTest() { string day1 = "tmr"; // TODO: Initialize to an appropriate value DateTime expected1 = new DateTime(); // TODO: Initialize to an appropriate value expected1 = DateTime.Now; expected1 = expected1.AddDays(1); DateTime actual1; actual1 = Parser_Accessor.DayToDate(day1); Assert.AreEqual(expected1.ToString(), actual1.ToString()); //Assert.Inconclusive("Verify the correctness of this test method."); }
public void evalTestEval() { Parser_Accessor target = new Parser_Accessor(); // TODO: Initialize to an appropriate value String input; double expected; double actual; try { input = "6*x^2"; target.inputFuntion(input); expected = 24F; // TODO: Initialize to an appropriate value actual = target.evalFuncAt(2); Assert.AreEqual(expected, actual); Console.WriteLine("e: " + expected + " a: " + actual); input = "sin(PI/2)"; target.inputFuntion(input); expected = 1F; // TODO: Initialize to an appropriate value actual = target.evalFuncAt(5); Assert.AreEqual(expected, actual); Console.WriteLine("e: " + expected + " a: " + actual); input = "5*x+2"; target.inputFuntion(input); expected = 7F; // TODO: Initialize to an appropriate value actual = target.evalFuncAt(1); Assert.AreEqual(expected, actual); Console.WriteLine("e: " + expected + " a: " + actual); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public void setEndAndStartPositionTest() { Parser_Accessor target = new Parser_Accessor(); string input = Utility.TEST_PARSER_TASK_ALL; int startPosition = 15; //st int startPositionExpected = 18; int endPosition = 0; int endPositionExpected = 23; int expected = 23; int actual; actual = target.setEndAndStartPosition(input, ref startPosition, ref endPosition); Assert.AreEqual(startPositionExpected, startPosition); Assert.AreEqual(endPositionExpected, endPosition); Assert.AreEqual(expected, actual); }
public void parseTaskDescriptionTest() { Parser_Accessor target = new Parser_Accessor(); string input = Utility.TEST_PARSER_TASK_ALL; string expected = Utility.TEST_PARSER_TASK_DESCRIPTION; string actual; actual = target.parseTaskDescription(input); Assert.AreEqual(expected, actual); }
public void parseTagTest() { Parser_Accessor target = new Parser_Accessor(); string input = Utility.TEST_PARSER_TASK_ALL; string expected = Utility.TEST_PARSERTAG; string actual; actual = target.parseTag(input); Assert.AreEqual(expected, actual); }
public void parseStartTimeTest() { Parser_Accessor target = new Parser_Accessor(); string input = Utility.TEST_PARSER_TASK_ALL; string expected = Utility.TEST_PARSER_STARTTIME; string actual; actual = target.parseStartTime(input); Assert.AreEqual(expected, actual); }