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

@ -22,7 +22,6 @@ import static google.registry.testing.DatastoreHelper.createTld;
import static google.registry.testing.DatastoreHelper.persistActiveContact;
import static google.registry.testing.DatastoreHelper.persistActiveHost;
import static google.registry.testing.DatastoreHelper.persistResource;
import static google.registry.testing.TestDataHelper.loadFileWithSubstitutions;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableList;
@ -113,8 +112,7 @@ public class DomainApplicationInfoFlowTest
private void doSuccessfulTest(String expectedXmlFilename, HostsState hostsState)
throws Exception {
assertTransactionalFlow(false);
String expected = loadFileWithSubstitutions(
getClass(), expectedXmlFilename, ImmutableMap.of("ROID", "123-TLD"));
String expected = loadFile(expectedXmlFilename, ImmutableMap.of("ROID", "123-TLD"));
if (hostsState.equals(HostsState.NO_HOSTS_EXIST)) {
expected = expected.replaceAll("\"ok\"", "\"inactive\"");
}