Exemplo n.º 1
0
 public void TestCalculateLatenessAmountShouldReturn2()
 {
     LateDirectory newDirectory = new LateDirectory("testTicketID");
     int amount = newDirectory.CalculateLatenessAmountOfParticularStudent("Jane", "Smith");
     Assert.AreEqual(2, amount);
 }
Exemplo n.º 2
0
 public void TestAssertLatenessDirectoryIsNotNull()
 {
     LateDirectory newDirectory = new LateDirectory("testTickedID");
     Assert.NotNull(newDirectory);
 }
Exemplo n.º 3
0
 public void TestAmountOfLatenessByStudentID()
 {
     LateDirectory newDirectory = new LateDirectory("testTicketID");
     int amount = newDirectory.CalculateLatenessAmountOfParticularStudent("20");
     Assert.AreEqual(2, amount);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 6
0
 public void TestRetrieveAllLatenessData()
 {
     LateDirectory testDirectory = new LateDirectory("testTicketID");
     List<LateTicket> AllTickets = testDirectory.GetAllTickets();
     Assert.AreEqual(7, AllTickets.Count);
 }