mirror of
https://github.com/google/nomulus
synced 2026-09-05 23:57:01 +00:00
Replace FailureStrategy with FailureMetadata in gtld's Subjects
Also changed truth.SubjectFactory to truth.Subject.Factory (plain renaming) and use method reference instead of anonymous class to create the factory when applicable. FailureMetadata, an opaque object to its users, is introduced to replace FailureStrategy in in custom Subject in order to resolve some existing flaws of FailureStrategy as well as enable new features to be added to Truth. New API is available in Truth-0.36, if there is a build/pom.xml, it's also updated to use this version. More information: See [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=176110788
This commit is contained in:
@@ -22,7 +22,7 @@ import static google.registry.testing.HistoryEntrySubject.assertAboutHistoryEntr
|
||||
import static google.registry.util.DiffUtils.prettyPrintEntityDeepDiff;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.FailureMetadata;
|
||||
import com.google.common.truth.Subject;
|
||||
import google.registry.model.EppResource;
|
||||
import google.registry.model.ImmutableObject;
|
||||
@@ -39,8 +39,8 @@ import org.joda.time.DateTime;
|
||||
abstract class AbstractEppResourceSubject
|
||||
<T extends EppResource, S extends AbstractEppResourceSubject<T, S>> extends Subject<S, T> {
|
||||
|
||||
public AbstractEppResourceSubject(FailureStrategy strategy, T subject) {
|
||||
super(strategy, checkNotNull(subject));
|
||||
public AbstractEppResourceSubject(FailureMetadata failureMetadata, T subject) {
|
||||
super(failureMetadata, checkNotNull(subject));
|
||||
}
|
||||
|
||||
private List<HistoryEntry> getHistoryEntries() {
|
||||
|
||||
Reference in New Issue
Block a user