public void FetchMoviesList_SetsProperties() { _movieMetaData.Setup(x => x.movieList).Returns("testmovie.json"); var response = _movieControllerTests.FetchMoviesList(); Assert.IsType <ObjectResult>(response.Result); var objectResult = response.Result as ObjectResult; var movieResponse = Assert.IsAssignableFrom <GetMoviesResponse>(objectResult.Value); var jsonString = System.IO.File.ReadAllText("testmovie.json"); var jsonObject = JsonConvert.DeserializeObject <GetMoviesResponse>(jsonString); Assert.Equal(jsonObject.Movies.AsEnumerable().First().Title, movieResponse.Movies.AsEnumerable().First().Title); }