public void testDescription() { TimeEntry target = new TimeEntry(); string expected = "This is a Simple Testing String"; string actual; target.description = expected; actual = target.description; Assert.AreEqual(expected, actual); }
public void testDay() { TimeEntry target = new TimeEntry(); DateTime expected = new DateTime(); DateTime actual; target.day = expected; actual = target.day; Assert.AreEqual(expected, actual); }
public void testAcceptableHours() { TimeEntry target = new TimeEntry(); target.hours = -0.25; Assert.AreEqual(target.hours, 0); target.hours = 24.25; Assert.AreEqual(target.hours, 0); }
private TimeEntry processEntry(string[] fields) { TimeEntry entry = new TimeEntry(); entry.jobId = fields[0].Trim('"'); entry.description = fields[1].Trim('"'); entry.day = Convert.ToDateTime(fields[2].Trim('"')); int fieldLength = fields.Length; entry.hours = Convert.ToDouble(fields[fieldLength-1].Trim('"')); return entry; }
public void testHours() { TimeEntry target = new TimeEntry(); double expected = 0.0; double actual; target.hours = expected; actual = target.hours; Assert.AreEqual(expected, actual); }
public void TimeEntryConstructorTest() { TimeEntry target = new TimeEntry(); Assert.AreEqual(target.description, String.Empty); Assert.AreEqual(target.jobId, String.Empty); Assert.AreEqual(target.hours, 0.0); Assert.AreEqual(target.day.Date, DateTime.Today); }
public void testJobId() { TimeEntry target = new TimeEntry(); string expected = "T14001"; string actual; target.jobId = expected; actual = target.jobId; Assert.AreEqual(expected, actual); }