mirror of
https://github.com/google/nomulus.git
synced 2025-07-25 12:08:36 +02:00
Migrate away from VoidWorks
This is one last hanging piece of work left over from last year's Java 8 migration. There's no functionality changes in this CL, just refactoring. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201947600
This commit is contained in:
parent
7d3cb3d426
commit
d3364b0387
18 changed files with 349 additions and 502 deletions
|
@ -17,7 +17,6 @@ package google.registry.model.common;
|
|||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
||||
import com.googlecode.objectify.VoidWork;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import org.junit.After;
|
||||
import org.junit.Rule;
|
||||
|
@ -47,11 +46,10 @@ public class GaeUserIdConverterTest {
|
|||
|
||||
@Test
|
||||
public void testSuccess_inTransaction() {
|
||||
ofy().transactNew(new VoidWork() {
|
||||
@Override
|
||||
public void vrun() {
|
||||
assertThat(GaeUserIdConverter.convertEmailAddressToGaeUserId("example@example.com"))
|
||||
.matches("[0-9]+");
|
||||
}});
|
||||
ofy()
|
||||
.transactNew(
|
||||
() ->
|
||||
assertThat(GaeUserIdConverter.convertEmailAddressToGaeUserId("example@example.com"))
|
||||
.matches("[0-9]+"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue