public async Task Update_get(DepositApproval approval) { IDb db = new MemDb(); ConsumerDepositApprovalRocksRepository repository = new ConsumerDepositApprovalRocksRepository(db, new DepositApprovalDecoder()); await repository.UpdateAsync(approval); DepositApproval retrieved = await repository.GetAsync(approval.Id); retrieved.Should().BeEquivalentTo(approval); }
public async Task Can_get_by_id() { IMongoDatabase database = MongoForTest.Provider.GetDatabase(); var repo = new ProviderDepositApprovalMongoRepository(database); DepositApproval depositApproval = BuildDummyDepositApproval(); await repo.AddAsync(depositApproval); DepositApproval result = await repo.GetAsync(depositApproval.Id); result.Should().BeEquivalentTo(depositApproval); }