public async Task AppendAsync_should_throw_when_input_null() { var dbContext = NSubstitute.Substitute.For <ISagaDbContext>(); var serializer = NSubstitute.Substitute.For <IPersistenceSerializer>(); var sut = new SqlOutboxRepository(dbContext, serializer, SqlOutboxRepositoryOptions.Default); await Assert.ThrowsAsync <ArgumentNullException>(async() => await sut.AppendAsync(null)); }
public async Task ReleaseAsync_should_throw_if_message_null() { var dbContext = NSubstitute.Substitute.For <ISagaDbContext>(); var serializer = NSubstitute.Substitute.For <IPersistenceSerializer>(); var sut = new SqlOutboxRepository(dbContext, serializer, SqlOutboxRepositoryOptions.Default); await Assert.ThrowsAsync <ArgumentNullException>(async() => await sut.ReleaseAsync(null, Guid.Empty)); }
private SqlOutboxRepository CreateSut(ISagaDbContext db) { var sut = new SqlOutboxRepository(db, new JsonSerializer(), SqlOutboxRepositoryOptions.Default); return(sut); }
private SqlOutboxRepository CreateSut() { var sut = new SqlOutboxRepository(_fixture.DbContext, new JsonSerializer(), SqlOutboxRepositoryOptions.Default); return(sut); }