Exemplo n.º 1
0
        public async Task Remove_Language()
        {
            var language = await LanguageHelpers.CreateValidLanguage();

            var repository = new LanguageRepository(_fixture.Context);

            (await repository.ExistsAsync(language.Id)).Should().BeTrue();

            await LanguageHelpers.RemoveLanguage(language.Id);

            var sut = await repository.GetAsync(language.Id);

            await _fixture.Context.Entry(sut).ReloadAsync();

            (await repository.ExistsAsync(language.Id)).Should().BeFalse();
        }
Exemplo n.º 2
0
        public async Task Language_inserted_to_database()
        {
            var language = await LanguageHelpers.CreateValidLanguage();

            var repository = new LanguageRepository(_fixture.Context);

            (await repository.ExistsAsync(language.Id)).Should().BeTrue();
        }