public void Update_CreatedUpdateAndRead1Record_UpdatedValues() { //Assemble ProgramModel programModel = new ProgramModel(); programModel.programTypeId = programTypeId; programModel.programCostId = programCostId; programModel.dogSpacesMaximum = 10; programModel.noOfClasses = 6; ProgramTable programTable = new ProgramTable(); int programID = programTable.create(programModel); programModel.id = programID; programModel.programTypeId = programTypeId; programModel.programCostId = programCostId; programModel.dogSpacesMaximum = 12; programModel.noOfClasses = 7; //Act programTable.update(programModel); ProgramModel actual = programTable.read(programID); //Assert Assert.AreEqual(programModel.programTypeId, actual.programTypeId); Assert.AreEqual(programModel.programCostId, actual.programCostId); Assert.AreEqual(programModel.dogSpacesMaximum, actual.dogSpacesMaximum); Assert.AreEqual(programModel.noOfClasses, actual.noOfClasses); }
public void Update_CreatedUpdateAndRead1Record_UpdatedValues() { //Assemble ProgramModel programModel = new ProgramModel(); programModel.programVarietyId = programVarietyId; ProgramTable programTable = new ProgramTable(); int programID = programTable.create(programModel); programModel.id = programID; programModel.programVarietyId = programVarietyId; //Act programTable.update(programModel); ProgramModel actual = programTable.read(programID); //Assert Assert.AreEqual(programModel.programVarietyId, actual.programVarietyId); }