public void PutCommandItem_AttributeUpdated_WhenValidObject() { //Arrange var command = new Command { HowTo = "Do Something", Platform = "Some Platform", CommandLine = "Some Command" }; dbContext.CommandItems.Add(command); dbContext.SaveChanges(); var cmdId = command.Id; command.HowTo = "UPDATED"; //Act controller.putCommandItem(cmdId, command); var result = dbContext.CommandItems.Find(cmdId); //Assert Assert.Equal(command.HowTo, result.HowTo); }