예제 #1
0
        public async Task SaveChangesAsync_SavesRepo()
        {
            var inMemoryCrudRepository = Substitute.ForPartsOf <InMemoryCrudRepository>(); // we could do this the entire fixture, but there is likely a bug in NSubstitute causing occasional failure of some tests (proxy calls base implementation CreateQueryable instead of derived)
            var sut = new SagaMetadataRepository(inMemoryCrudRepository);

            await sut.SaveChangesAsync();

            inMemoryCrudRepository.Received(1).SaveChangesAsync(Arg.Any <CancellationToken>());
        }
예제 #2
0
 public SagaMetadataRepositoryTests()
 {
     inMemoryCrudRepository = new InMemoryCrudRepository();
     sut = new SagaMetadataRepository(inMemoryCrudRepository);
 }