public void WhenUpdate_ValidUser_ReturnsOk()
        {
            // Arrange
            IEnumerable<Artist> mockArtists = GetMockArtists();

            // setup
            var artistId = 2;
            repo.Setup(x => x.GetArtist(artistId)).Returns(mockArtists.FirstOrDefault(p => p.ArtistId == artistId));
            ArtistController controller = new ArtistController(repo.Object);

            // Act
            var result = controller.Put(2, new Artist { ArtistId = 2, Name = "Enya", UrlSafeName = "enya" })
                 as OkNegotiatedContentResult<Artist>;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(2, result.Content.ArtistId);
            Assert.AreEqual("Enya", result.Content.Name);
        }
        public void WhenUpdate_InValidUser_ShouldFail()
        {
            // Arrange
            IEnumerable<Artist> mockArtists = GetMockArtists();
            ArtistController controller = new ArtistController(repo.Object);

            // Act
            IHttpActionResult result = controller.Put(10, new Artist { ArtistId = 10, Name = "Taylor", UrlSafeName = "taylor" });

            // Assert
            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(NotFoundResult));
        }