public void TestMethod_bStudent_inequality()
        {
            // Students are equal if index ID number is the same.
            bachelorStudent testUnit1 = new bachelorStudent("name", "surname", new DateTime(1990, 1, 1), "1111111111111", "16781", new DateTime(2016, 1, 1));
            bachelorStudent testUnit2 = new bachelorStudent("name", "surname", new DateTime(1990, 1, 1), "1111111111111", "16782", new DateTime(2016, 1, 1));

            Assert.AreNotEqual(testUnit1, testUnit2);
        }
        public void DataDrivenTest_CreatingBachelorFromDatabase()
        {
            bachelorStudent test = new bachelorStudent(Convert.ToString(TestContext.DataRow["Name"]), Convert.ToString(TestContext.DataRow["Surname"]), Convert.ToDateTime(TestContext.DataRow["DateOfBirth"]), Convert.ToString(TestContext.DataRow["IDNumber"]), Convert.ToString(TestContext.DataRow["IDIndexNumber"]), Convert.ToDateTime(TestContext.DataRow["EndOfPrevEd"]));

            Faculty testFax = new Faculty("ETF");

            testFax.AddBachelorStudent(Convert.ToString(TestContext.DataRow["Name"]), Convert.ToString(TestContext.DataRow["Surname"]), Convert.ToDateTime(TestContext.DataRow["DateOfBirth"]), Convert.ToString(TestContext.DataRow["IDNumber"]), Convert.ToDateTime(TestContext.DataRow["EndOfPrevEd"]));
            Assert.IsTrue(test.IDnumber == testFax.FindStudent(Convert.ToString(TestContext.DataRow["IDNumber"])));
        }
        public void TestMethod_FindBachelorStudentCSV()
        {
            bachelorStudent test = new bachelorStudent(Convert.ToString(TestContext.DataRow["Name"]), Convert.ToString(TestContext.DataRow["Surname"]), new DateTime(1990, 1, 1), Convert.ToString(TestContext.DataRow["IDNumber"]), Convert.ToString(TestContext.DataRow["IDIndexNumber"]), new DateTime(2013, 1, 5));

            Faculty testFax = new Faculty("ETF");

            testFax.AddBachelorStudent(Convert.ToString(TestContext.DataRow["Name"]), Convert.ToString(TestContext.DataRow["Surname"]), new DateTime(1990, 1, 1), Convert.ToString(TestContext.DataRow["IDNumber"]), new DateTime(2013, 1, 5));
            Assert.IsTrue(test.IDnumber == testFax.FindStudent(Convert.ToString(TestContext.DataRow["IDNumber"])));
        }
Esempio n. 4
0
        public void TestMethod_AssigningListOfBachelorStudents()
        {
            Faculty testFax = new Faculty("ETF");

            bachelorStudent        unit1 = new bachelorStudent("name", "surname", new DateTime(1990, 1, 1), "1111111111111", "16781", new DateTime(2005, 1, 1));
            bachelorStudent        unit2 = new bachelorStudent("name", "surname", new DateTime(1990, 1, 1), "1111111111112", "16782", new DateTime(2005, 1, 1));
            bachelorStudent        unit3 = new bachelorStudent("name", "surname", new DateTime(1990, 1, 1), "1111111111113", "16783", new DateTime(2005, 1, 1));
            List <bachelorStudent> input = new List <bachelorStudent>();

            testFax.ListOfBachelorStudents = input;

            /* List of bachelor students cannot be
             * assigned because we don't know if the list
             * is valid for system input
             */
        }
 public void TestMethod_bStudent_invalidIndexId_numeric() // Invalid index ID - numeric (must be 13 letters)
 {
     bachelorStudent testUnit1 = new bachelorStudent("name", "surname", new DateTime(1990, 1, 1), "1111111111111", "16a#1", new DateTime(2016, 1, 1));
 }
 public void TestMethod_bStudent_creatingInstance()
 {
     // Parameters: bachelorStudent(string name, string surname, DateTime dateOfBirth, string IDnumber, string indexIDnumber, DateTime endOfPreviousEducation) : base(name, surname, dateOfBirth, IDnumber, indexIDnumber, endOfPreviousEducation)
     bachelorStudent testUnit = new bachelorStudent("name", "surname", new DateTime(1990, 1, 1), "1111111111111", "16781", new DateTime(2005, 1, 1));
 }