Add syntheticCreationTime to BillingEvent.OneTime

In order to clean up potentially bad BillingEvent.Recurring expansions, we'll need to be able to trace synthetic billing events back to particular runs of the []. This field will be set to the cursor time at the start of the MR (all expansions in one MR job will have the same timestamp).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121999938
This commit is contained in:
ctingue 2016-05-10 16:16:04 -07:00 committed by Justine Tunney
parent d62da7bb19
commit 51362722cd
4 changed files with 76 additions and 18 deletions

View file

@ -67,29 +67,32 @@ public abstract class EppToolCommandTestCase<C extends EppToolCommand> extends C
/** Helper to get a new {@link EppVerifier} instance. */
EppVerifier eppVerifier() {
return new EppVerifier();
return new EppVerifier("NewRegistrar", false, false);
}
/** Builder pattern class for verifying EPP commands sent to the server. */
/** Class for verifying EPP commands sent to the server. */
class EppVerifier {
String clientIdentifier = "NewRegistrar";
boolean superuser = false;
boolean dryRun = false;
private final String clientIdentifier;
private final boolean superuser;
private final boolean dryRun;
private EppVerifier(String clientIdentifier, boolean superuser, boolean dryRun) {
this.clientIdentifier = clientIdentifier;
this.superuser = superuser;
this.dryRun = dryRun;
}
EppVerifier setClientIdentifier(String clientIdentifier) {
this.clientIdentifier = clientIdentifier;
return this;
return new EppVerifier(clientIdentifier, superuser, dryRun);
}
EppVerifier asSuperuser() {
this.superuser = true;
return this;
return new EppVerifier(clientIdentifier, true, dryRun);
}
EppVerifier asDryRun() {
this.dryRun = true;
return this;
return new EppVerifier(clientIdentifier, superuser, true);
}
void verifySent(String... filesToMatch) throws Exception {