public async Task GetSingleEntityTest() { var fakeRepositoryMock = new Mock <IMoviesContext>(); fakeRepositoryMock.Setup(x => x.GetMoviesSingle(It.IsAny <int>())).ReturnsAsync(var); var movieService = new MoviesService(fakeRepositoryMock.Object); var result = await movieService.GetMoviesSingle(3); Assert.Equal("Ham Ham", result.Name); }