public void Patch() { var totalSongsBefore = playlist.GetAll().Count(); var song = repository.Get(m => m.Id == 1); song.Artist += totalSongsBefore; var httpStatus = controller.Patch(song, 1); var songAfter = repository.Get(m => m.Id == 1); FailIfNull(m => controller.Patch(m, 1)); FailIfMissingFields(m => controller.Patch(m, 1)); FailIfNotFound(m => controller.Patch(song, m)); Assert.AreEqual(HttpStatusCode.OK, httpStatus.StatusCode); Assert.AreEqual(song.Artist, songAfter.Artist); }