mirror of
https://github.com/google/nomulus.git
synced 2025-06-28 23:33:36 +02:00
Rename all testdata loading files to conform to a single naming scheme
The scheme is: - loadBytes: returns a ByteSource of the data - loadFile: returns a string using UTF8 encoding, optionally applying substitutions ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=177606406
This commit is contained in:
parent
ebfa27b3ad
commit
b8970bfe1b
94 changed files with 428 additions and 449 deletions
|
@ -147,7 +147,7 @@ public class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, D
|
|||
assertTransactionalFlow(true);
|
||||
DateTime currentExpiration = reloadResourceByForeignKey().getRegistrationExpirationTime();
|
||||
DateTime newExpiration = currentExpiration.plusYears(renewalYears);
|
||||
runFlowAssertResponse(readFile(responseFilename, substitutions));
|
||||
runFlowAssertResponse(loadFile(responseFilename, substitutions));
|
||||
DomainResource domain = reloadResourceByForeignKey();
|
||||
HistoryEntry historyEntryDomainRenew =
|
||||
getOnlyHistoryEntryOfType(domain, HistoryEntry.Type.DOMAIN_RENEW);
|
||||
|
@ -215,7 +215,7 @@ public class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, D
|
|||
@Test
|
||||
public void testDryRun() throws Exception {
|
||||
persistDomain();
|
||||
dryRunFlowAssertResponse(readFile("domain_renew_response.xml"));
|
||||
dryRunFlowAssertResponse(loadFile("domain_renew_response.xml"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -385,7 +385,7 @@ public class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, D
|
|||
ofy().load().key(reloadResourceByForeignKey().getAutorenewPollMessage()).now().asBuilder()
|
||||
.setEventTime(expirationTime.minusYears(1))
|
||||
.build());
|
||||
runFlowAssertResponse(readFile("domain_renew_response.xml"));
|
||||
runFlowAssertResponse(loadFile("domain_renew_response.xml"));
|
||||
HistoryEntry historyEntryDomainRenew =
|
||||
getOnlyHistoryEntryOfType(reloadResourceByForeignKey(), HistoryEntry.Type.DOMAIN_RENEW);
|
||||
assertPollMessages(
|
||||
|
@ -618,7 +618,7 @@ public class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, D
|
|||
sessionMetadata.setClientId("NewRegistrar");
|
||||
persistDomain();
|
||||
runFlowAssertResponse(
|
||||
CommitMode.LIVE, UserPrivileges.SUPERUSER, readFile("domain_renew_response.xml"));
|
||||
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_renew_response.xml"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -636,7 +636,7 @@ public class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, D
|
|||
loadRegistrar("TheRegistrar").asBuilder().setAllowedTlds(ImmutableSet.of()).build());
|
||||
persistDomain();
|
||||
runFlowAssertResponse(
|
||||
CommitMode.LIVE, UserPrivileges.SUPERUSER, readFile("domain_renew_response.xml"));
|
||||
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_renew_response.xml"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue