Exemplo n.º 1
0
        public async void DoesUserExistAsync_ValidId_ReturnsTrue()
        {
            // Given
            using (var context = new MovieDbContext(_options))
            {
                BuildMoviesContext(context);
                await context.SaveChangesAsync();
            }

            using (var context = new MovieDbContext(_options))
                using (var movieRepo = new MovieRepository(context))
                {
                    // When
                    var result = await movieRepo.DoesUserExistAsync(2);

                    // Then
                    Assert.True(result);
                }
        }