public void Update_CreatedUpdateAndRead1Record_UpdatedValues() { //Assemble ClientModel clientModel = new ClientModel(); clientModel.name = "Bob"; clientModel.phone = "07561 101169"; clientModel.email = "*****@*****.**"; ClientTable clientTable = new ClientTable(); int clientID = clientTable.create(clientModel); clientModel.id = clientID; clientModel.name = "Kate"; clientModel.phone = "07561 101170"; clientModel.email = "*****@*****.**"; //Act clientTable.update(clientModel); ClientModel actual = clientTable.read(clientID); //Assert Assert.AreEqual(clientModel.name, actual.name); Assert.AreEqual(clientModel.phone, actual.phone); Assert.AreEqual(clientModel.email, actual.email); }
public void Read_CreatedAndRead1Record_CorrectValues() { //Assemble ClientModel clientModel = new ClientModel(); clientModel.name = "Bob"; clientModel.phone = "07561 101169"; clientModel.email = "*****@*****.**"; ClientTable clientTable = new ClientTable(); //Act int clientID = clientTable.create(clientModel); ClientModel actual = clientTable.read(clientID); //Assert Assert.AreEqual(clientModel.name, actual.name); Assert.AreEqual(clientModel.phone, actual.phone); Assert.AreEqual(clientModel.email, actual.email); }