mirror of
https://github.com/google/nomulus.git
synced 2025-08-03 00:12:11 +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
|
@ -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))));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue