mirror of
https://github.com/google/nomulus.git
synced 2025-05-28 12:31:08 +02:00
Refactor Guava functional methods to use lambdas
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=177027488
This commit is contained in:
parent
2ae496bfce
commit
bbe2584da4
47 changed files with 478 additions and 647 deletions
|
@ -24,8 +24,8 @@ import static google.registry.testing.DatastoreHelper.persistActiveContact;
|
|||
import static google.registry.testing.DatastoreHelper.persistActiveHost;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.TestDataHelper.loadFileWithSubstitutions;
|
||||
import static google.registry.util.DatastoreServiceUtils.KEY_TO_KIND_FUNCTION;
|
||||
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.googlecode.objectify.Key;
|
||||
|
@ -644,13 +644,12 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
|
|||
.filter(
|
||||
keys ->
|
||||
keys.stream()
|
||||
.map(KEY_TO_KIND_FUNCTION)
|
||||
.map(com.google.appengine.api.datastore.Key::getKind)
|
||||
.anyMatch(
|
||||
kind ->
|
||||
Predicates.in(
|
||||
ImmutableSet.of(
|
||||
Key.getKind(ContactResource.class),
|
||||
Key.getKind(HostResource.class))
|
||||
.contains(kind)))
|
||||
Key.getKind(ContactResource.class),
|
||||
Key.getKind(HostResource.class)))))
|
||||
.count();
|
||||
assertThat(numReadsWithContactsOrHosts).isEqualTo(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue