mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 16:37:13 +02:00
Replace many Work and VoidWork usages with lambdas
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=176153460
This commit is contained in:
parent
603e0470cc
commit
cd314bdc75
36 changed files with 443 additions and 680 deletions
|
@ -28,7 +28,6 @@ import static org.joda.time.DateTimeZone.UTC;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.VoidWork;
|
||||
import google.registry.model.EntityTestCase;
|
||||
import google.registry.model.domain.DomainApplication;
|
||||
import google.registry.testing.ExceptionRule;
|
||||
|
@ -132,12 +131,12 @@ public class DomainApplicationIndexTest extends EntityTestCase {
|
|||
persistResource(createUpdatedInstance(application));
|
||||
applicationsBuilder.add(application);
|
||||
}
|
||||
ofy().transact(new VoidWork() {
|
||||
@Override
|
||||
public void vrun() {
|
||||
assertThat(DomainApplicationIndex.load("example.com")).isNotNull();
|
||||
assertThat(loadActiveApplicationsByDomainName("example.com", clock.nowUtc()))
|
||||
.containsExactlyElementsIn(applicationsBuilder.build());
|
||||
}});
|
||||
ofy()
|
||||
.transact(
|
||||
() -> {
|
||||
assertThat(DomainApplicationIndex.load("example.com")).isNotNull();
|
||||
assertThat(loadActiveApplicationsByDomainName("example.com", clock.nowUtc()))
|
||||
.containsExactlyElementsIn(applicationsBuilder.build());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue