public void Count_AllRecordsDeleted_0() { //Assemble int expected = 0; ClassTable classTable = new ClassTable(); //Act int actual = classTable.count(); //Assert Assert.AreEqual(expected, actual); }
public void Delete_NonExistantId_0() { //Assemble ClassTable classTable = new ClassTable(); int expected = 0; //Act classTable.delete(0); int actual = classTable.count(); //Assert Assert.AreEqual(expected, actual); }
public void Count_Created1Record_1() { //Assemble ClassModel classModel = new ClassModel(); classModel.programId = programId; classModel.staffId = staffId; classModel.classDate = new DateTime(2021, 10, 05); classModel.startTime = new TimeSpan(2, 32, 0); classModel.endTime = new TimeSpan(3, 32, 0); int expected = 1; ClassTable classTable = new ClassTable(); //Act int classID = classTable.create(classModel); int actual = classTable.count(); //Assert Assert.AreEqual(expected, actual); }
public void Delete_CreatedDeleteAndCount1Record_0() { //Assemble ClassModel classModel = new ClassModel(); classModel.programId = programId; classModel.staffId = staffId; classModel.classDate = new DateTime(2021, 01, 03); classModel.startTime = new TimeSpan(2, 33, 0); classModel.endTime = new TimeSpan(3, 33, 0); int expected = 0; ClassTable classTable = new ClassTable(); int classID = classTable.create(classModel); //Act classTable.delete(classID); int actual = classTable.count(); //Assert Assert.AreEqual(expected, actual); }