public void Delete_LeaseExists_LeaseDeleted( IConcurrencyControlRepository<ElasticLease> repo, ElasticLease lease, ISystemContext ctx, TestIndexUtils contactIndex) { using (contactIndex) { repo.Create(lease, ctx); repo.Delete(lease.ResourceId, ctx); repo.Get(lease.ResourceId, ctx).Should().BeNull(); } }
public void Delete_NoLeaseExists_TrueIsReturned( IConcurrencyControlRepository<ElasticLease> repo, ISystemContext ctx, TestIndexUtils contactIndex) { using (contactIndex) { repo.Delete(new Guid(), ctx); } }