示例#1
0
 public void TestCalculateLatenessAmountShouldReturn2()
 {
     LateDirectory newDirectory = new LateDirectory("testTicketID");
     int amount = newDirectory.CalculateLatenessAmountOfParticularStudent("Jane", "Smith");
     Assert.AreEqual(2, amount);
 }
示例#2
0
 public void TestAssertLatenessDirectoryIsNotNull()
 {
     LateDirectory newDirectory = new LateDirectory("testTickedID");
     Assert.NotNull(newDirectory);
 }
示例#3
0
 public void TestAmountOfLatenessByStudentID()
 {
     LateDirectory newDirectory = new LateDirectory("testTicketID");
     int amount = newDirectory.CalculateLatenessAmountOfParticularStudent("20");
     Assert.AreEqual(2, amount);
 }
示例#4
0
 public void TestRetrieveLatenessOnParticularDate()
 {
     LateDirectory testDirectory = new LateDirectory("testTicketID");
     List<LateTicket> LateTicketOfADay = testDirectory.RetrieveParticularDateInfo(2014, 5, 2);
     Assert.AreEqual(3, LateTicketOfADay.Count);
     Assert.AreEqual("1", LateTicketOfADay[0].ID);
     Assert.AreEqual("2", LateTicketOfADay[1].ID);
     Assert.AreEqual("3", LateTicketOfADay[2].ID);
 }
示例#5
0
 public void TestRetrieveCorrectDataByTicketID()
 {
     LateDirectory newDirectory = new LateDirectory("testTicketID");
     TestTicket = newDirectory.RetrieveParticularTicketData("3");
     Assert.AreEqual("Rita", TestTicket.StudentInfo.Name.First);
     Assert.AreEqual("Ram", TestTicket.StudentInfo.Name.Last);
     Assert.AreEqual(8.26, TestTicket.TimeArrived);
     Assert.AreEqual(2014, TestTicket.IssueDate.Year);
     Assert.AreEqual(5, TestTicket.IssueDate.Month);
     Assert.AreEqual(2, TestTicket.IssueDate.Day);
 }
示例#6
0
 public void TestRetrieveAllLatenessData()
 {
     LateDirectory testDirectory = new LateDirectory("testTicketID");
     List<LateTicket> AllTickets = testDirectory.GetAllTickets();
     Assert.AreEqual(7, AllTickets.Count);
 }