mirror of
https://github.com/google/nomulus.git
synced 2025-07-20 17:56:08 +02:00
Record a version of EPP metrics with TLD for domain commands
Also fixes the issue that dry run EPP commands were incorrectly being reported on. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=171062984
This commit is contained in:
parent
7e68ffa16a
commit
302a27f0db
13 changed files with 283 additions and 61 deletions
|
@ -61,6 +61,17 @@ public class EppMetricSubject extends Subject<EppMetricSubject, EppMetric> {
|
|||
return new And<>(this);
|
||||
}
|
||||
|
||||
public And<EppMetricSubject> hasTld(String tld) {
|
||||
return hasValue(tld, actual().getTld(), "has tld");
|
||||
}
|
||||
|
||||
public And<EppMetricSubject> hasNoTld() {
|
||||
if (actual().getTld().isPresent()) {
|
||||
fail("has no tld");
|
||||
}
|
||||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue