Beispiel #1
0
        public void FindMethodOK()
        {
            clsStaff Staff   = new clsStaff();
            Boolean  Found   = false;
            Int32    StaffID = 1;

            Found = Staff.Find(StaffID);
            Assert.IsTrue(Found);
        }
Beispiel #2
0
        public void TestShiftFound()
        {
            clsStaff AnStaff = new clsStaff();
            Boolean  Found   = false;

            Int32 StaffId = 4;

            Found = AnStaff.Find(StaffId);
            if (AnStaff.Shift != true)
            {
            }
        }
Beispiel #3
0
        public void FindMethodOK()
        {
            //create an instance of the class we want to create
            clsStaff StaffMember = new clsStaff();
            //boolean variable to store the result of the validation
            Boolean Found = false;
            //create some test data to use with the method
            Int32 StaffID = 1;

            //invoke the method
            Found = StaffMember.Find(StaffID);
            //test to see that the result is correct
            Assert.IsTrue(Found);
        }
Beispiel #4
0
        public void TestStaffNameFound()
        {
            clsStaff Staff   = new clsStaff();
            Boolean  Found   = false;
            Boolean  OK      = true;
            Int32    StaffID = 1;

            Found = Staff.Find(StaffID);
            if (Staff.StaffName != "Staff Name")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Beispiel #5
0
        public void TestIsManagerFound()
        {
            clsStaff Staff   = new clsStaff();
            Boolean  Found   = false;
            Boolean  OK      = true;
            Int32    StaffID = 1;

            Found = Staff.Find(StaffID);
            if (Staff.IsManager != true)
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Beispiel #6
0
        public void TestDateAddedFound()
        {
            clsStaff Staff   = new clsStaff();
            Boolean  Found   = false;
            Boolean  OK      = true;
            Int32    StaffID = 1;

            Found = Staff.Find(StaffID);
            if (Staff.DateAdded != Convert.ToDateTime("20/03/2021"))
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Beispiel #7
0
        public void TestNINumberFound()
        {
            clsStaff AnStaff = new clsStaff();
            Boolean  Found   = false;
            Boolean  OK      = true;
            Int32    StaffId = 1;

            Found = AnStaff.Find(StaffId);
            if (AnStaff.NINumber != "8765438")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Beispiel #8
0
        public void TestTaxCodeFound()
        {
            clsStaff AnStaff = new clsStaff();
            Boolean  Found   = false;
            Boolean  OK      = true;
            Int32    StaffId = 1;

            Found = AnStaff.Find(StaffId);
            if (AnStaff.TaxCode != "P56")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Beispiel #9
0
        public void TestContactNumberFound()
        {
            clsStaff AnStaff = new clsStaff();
            Boolean  Found   = false;
            Boolean  OK      = true;
            Int32    StaffId = 1;

            Found = AnStaff.Find(StaffId);
            if (AnStaff.ContactNumber != "07543234")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Beispiel #10
0
        public void TestStaffLastNameFound()
        {
            clsStaff AnStaff = new clsStaff();
            Boolean  Found   = false;
            Boolean  OK      = true;
            Int32    StaffId = 1;

            Found = AnStaff.Find(StaffId);
            if (AnStaff.StaffLastName != "Eguavoen")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Beispiel #11
0
        public void TestDateEndedFound()
        {
            clsStaff AnStaff = new clsStaff();
            Boolean  Found   = false;
            Boolean  OK      = true;
            Int32    StaffId = 1;

            Found = AnStaff.Find(StaffId);
            if (AnStaff.DateEnded != Convert.ToDateTime("01/12/2018"))
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Beispiel #12
0
        public void TestStaffSalaryFound()
        {
            //create an instance of the class we want to create
            clsStaff StaffMember = new clsStaff();
            //boolean variable to store the result of the search
            Boolean Found = false;
            //boolean variable to record if the data is OK(Assume it is)
            Boolean OK = true;
            //create some test data to use with the method
            Int32 StaffID = 1;

            //invoke the method
            Found = StaffMember.Find(StaffID);
            //check the property
            if (StaffMember.StaffSalary != 50000)
            {
                OK = false;
            }
            //test to see that the result is correct
            Assert.IsTrue(OK);
        }