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:
guyben 2017-12-01 10:16:22 -08:00 committed by jianglai
parent ebfa27b3ad
commit b8970bfe1b
94 changed files with 428 additions and 449 deletions

View file

@ -67,7 +67,7 @@ public class DomainApplicationDeleteFlowTest
public void doSuccessfulTest() throws Exception {
assertTransactionalFlow(true);
clock.advanceOneMilli();
runFlowAssertResponse(readFile("domain_delete_response.xml"));
runFlowAssertResponse(loadFile("domain_delete_response.xml"));
// Check that the domain is fully deleted.
assertThat(reloadDomainApplication()).isNull();
assertNoBillingEvents();
@ -77,7 +77,7 @@ public class DomainApplicationDeleteFlowTest
public void testDryRun() throws Exception {
persistResource(
newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD").build());
dryRunFlowAssertResponse(readFile("domain_delete_response.xml"));
dryRunFlowAssertResponse(loadFile("domain_delete_response.xml"));
}
@Test
@ -157,7 +157,7 @@ public class DomainApplicationDeleteFlowTest
newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD").build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, readFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
}
@Test
@ -176,7 +176,7 @@ public class DomainApplicationDeleteFlowTest
loadRegistrar("TheRegistrar").asBuilder().setAllowedTlds(ImmutableSet.of()).build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, readFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
}
@Test
@ -203,7 +203,7 @@ public class DomainApplicationDeleteFlowTest
.build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, readFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
}
@Test
@ -281,7 +281,7 @@ public class DomainApplicationDeleteFlowTest
newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD").build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, readFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
}
@Test
@ -291,7 +291,7 @@ public class DomainApplicationDeleteFlowTest
newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD").build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, readFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
}
@Test
@ -301,7 +301,7 @@ public class DomainApplicationDeleteFlowTest
newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD").build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, readFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
}
@Test