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.flows.EppXmlTransformer.marshal;
import static google.registry.model.ofy.ObjectifyService.ofy;
import static google.registry.testing.DatastoreHelper.BILLING_EVENT_ID_STRIPPER;
import static google.registry.testing.DatastoreHelper.getPollMessages;
import static google.registry.testing.TestDataHelper.loadFile;
import static google.registry.xml.XmlTestUtils.assertXmlEquals;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.joda.time.DateTimeZone.UTC;
@ -135,12 +134,12 @@ public abstract class FlowTestCase<F extends Flow> extends ShardableTestCase {
return eppMetricBuilder.build();
}
protected String readFile(String filename) {
return loadFile(getClass(), filename);
protected String loadFile(String filename) {
return TestDataHelper.loadFile(getClass(), filename);
}
protected String readFile(String filename, Map<String, String> substitutions) {
return TestDataHelper.loadFileWithSubstitutions(getClass(), filename, substitutions);
protected String loadFile(String filename, Map<String, String> substitutions) {
return TestDataHelper.loadFile(getClass(), filename, substitutions);
}
protected String getClientTrid() throws Exception {