Add more EPP metric lifecycle tests

This also refactors some of the existing EPP XML testdata files
to use a consistent wildcard naming scheme.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154569632
This commit is contained in:
mcilwain 2017-04-28 12:33:17 -07:00 committed by Ben McIlwain
parent 44546a3480
commit 876552f1ce
15 changed files with 200 additions and 56 deletions

View file

@ -54,6 +54,13 @@ public class EppMetricSubject extends Subject<EppMetricSubject, EppMetric> {
return hasValue(status, actual().getStatus(), "has status");
}
public And<EppMetricSubject> hasNoStatus() {
if (actual().getStatus().isPresent()) {
fail("has no status");
}
return new And<>(this);
}
private <E> And<EppMetricSubject> hasValue(E expected, Optional<E> actual, String verb) {
checkArgumentNotNull(expected, "Expected value cannot be null");
if (actual == null) {