Beispiel #1
0
        public void Count_AllRecordsDeleted_0()
        {
            //Assemble
            int        expected   = 0;
            StaffTable staffTable = new StaffTable();

            //Act
            int actual = staffTable.count();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Beispiel #2
0
        public void Delete_NonExistantId_0()
        {
            //Assemble
            StaffTable staffTable = new StaffTable();
            int        expected   = 0;

            //Act
            staffTable.delete(0);
            int actual = staffTable.count();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Beispiel #3
0
        public void Count_Created1Record_1()
        {
            //Assemble
            StaffModel staffModel = new StaffModel();

            staffModel.name = "Bob";
            int        expected   = 1;
            StaffTable staffTable = new StaffTable();

            //Act
            int staffID = staffTable.create(staffModel);
            int actual  = staffTable.count();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Beispiel #4
0
        public void Delete_CreatedDeleteAndCount1Record_0()
        {
            //Assemble
            StaffModel staffModel = new StaffModel();

            staffModel.name = "Bob";
            int        expected   = 0;
            StaffTable staffTable = new StaffTable();
            int        staffID    = staffTable.create(staffModel);

            //Act
            staffTable.delete(staffID);
            int actual = staffTable.count();

            //Assert
            Assert.AreEqual(expected, actual);
        }