コード例 #1
0
            public async void Should_DeleteAsync_Valid()
            {
                await using var context = new TestContext(ContextOptions);
                var repository = new AccountsRepository(
                    new Mock <ILogger <AbstractRepository <AccountsContext, AccountEntity> > >().Object,
                    context
                    );
                var newEntity      = new AccountEntity();
                var newEntitySaved = await repository.AddAsync(newEntity);

                var result = await repository.DeleteAsync(newEntitySaved.Id);

                Assert.NotNull(result);
            }