Example #1
0
        public void Delete_NonExistantId_0()
        {
            //Assemble
            EnrollmentTable enrollmentTable = new EnrollmentTable();
            int             expected        = 0;

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

            //Assert
            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void Delete_CreatedDeleteAndCount1Record_0()
        {
            //Assemble
            EnrollmentModel enrollmentModel = new EnrollmentModel();

            enrollmentModel.programId = programId;
            enrollmentModel.clientId  = clientId;
            enrollmentModel.dogId     = dogId;
            enrollmentModel.programId = programId;
            int             expected        = 0;
            EnrollmentTable enrollmentTable = new EnrollmentTable();
            int             enrollmentID    = enrollmentTable.create(enrollmentModel);

            //Act
            enrollmentTable.delete(enrollmentID);
            int actual = enrollmentTable.count();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Example #3
0
        public void Delete_CreatedDeleteAndCount1Record_0()
        {
            //Assemble
            EnrollmentModel enrollmentModel = new EnrollmentModel();

            enrollmentModel.programId     = programId;
            enrollmentModel.clientId      = clientId;
            enrollmentModel.dogId         = dogId;
            enrollmentModel.programId     = programId;
            enrollmentModel.name          = "Regular";
            enrollmentModel.paymentMethod = 1;
            enrollmentModel.joinDate      = DateTime.Now;
            enrollmentModel.inviteIssued  = true;
            int             expected        = 0;
            EnrollmentTable enrollmentTable = new EnrollmentTable();
            int             enrollmentID    = enrollmentTable.create(enrollmentModel);

            //Act
            enrollmentTable.delete(enrollmentID);
            int actual = enrollmentTable.count();

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