mirror of
https://github.com/google/nomulus
synced 2026-09-18 22:14:23 +00: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:
@@ -32,13 +32,13 @@ public final class TmchTestData {
|
||||
}
|
||||
|
||||
/** Loads data from file in {@code tmch/testdata/} as a String. */
|
||||
public static String loadString(String filename) {
|
||||
public static String loadFile(String filename) {
|
||||
return TestDataHelper.loadFile(TmchTestData.class, filename);
|
||||
}
|
||||
|
||||
/** Extracts SMD XML from an ASCII-armored file. */
|
||||
public static byte[] loadSmd(String file) {
|
||||
String data = loadString(file);
|
||||
String data = loadFile(file);
|
||||
return base64().decode(whitespace().removeFrom(data.substring(
|
||||
data.indexOf(BEGIN_ENCODED_SMD) + BEGIN_ENCODED_SMD.length(),
|
||||
data.indexOf(END_ENCODED_SMD))));
|
||||
|
||||
Reference in New Issue
Block a user