public void Count_AllRecordsDeleted_0()
        {
            //Assemble
            int          expected     = 0;
            ProgramTable programTable = new ProgramTable();

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

            //Assert
            Assert.AreEqual(expected, actual);
        }
        public void Delete_NonExistantId_0()
        {
            //Assemble
            ProgramTable programTable = new ProgramTable();
            int          expected     = 0;

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

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

            programModel.programVarietyId = programVarietyId;

            int          expected     = 1;
            ProgramTable programTable = new ProgramTable();

            //Act
            int programID = programTable.create(programModel);
            int actual    = programTable.count();

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

            programModel.programVarietyId = programVarietyId;

            int          expected     = 0;
            ProgramTable programTable = new ProgramTable();
            int          programID    = programTable.create(programModel);

            //Act
            programTable.delete(programID);
            int actual = programTable.count();

            //Assert
            Assert.AreEqual(expected, actual);
        }
        public void Count_Created1Record_1()
        {
            //Assemble
            ProgramModel programModel = new ProgramModel();

            programModel.programTypeId    = programTypeId;
            programModel.programCostId    = programCostId;
            programModel.dogSpacesMaximum = 10;
            programModel.noOfClasses      = 6;
            int          expected     = 1;
            ProgramTable programTable = new ProgramTable();

            //Act
            int programID = programTable.create(programModel);
            int actual    = programTable.count();

            //Assert
            Assert.AreEqual(expected, actual);
        }
        public void Delete_CreatedDeleteAndCount1Record_0()
        {
            //Assemble
            ProgramModel programModel = new ProgramModel();

            programModel.programTypeId    = programTypeId;
            programModel.programCostId    = programCostId;
            programModel.dogSpacesMaximum = 12;
            programModel.noOfClasses      = 7;
            int          expected     = 0;
            ProgramTable programTable = new ProgramTable();
            int          programID    = programTable.create(programModel);

            //Act
            programTable.delete(programID);
            int actual = programTable.count();

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