mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 06:44:51 +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
|
@ -29,7 +29,7 @@ public class ValidateEscrowDepositCommandTest
|
|||
|
||||
@Test
|
||||
public void testRun_plainXml() throws Exception {
|
||||
String file = writeToTmpFile(RdeTestData.get("deposit_full.xml").read());
|
||||
String file = writeToTmpFile(RdeTestData.loadBytes("deposit_full.xml").read());
|
||||
runCommand("--input=" + file);
|
||||
assertThat(getStdoutAsString()).isEqualTo(""
|
||||
+ "ID: 20101017001\n"
|
||||
|
@ -64,7 +64,7 @@ public class ValidateEscrowDepositCommandTest
|
|||
|
||||
@Test
|
||||
public void testRun_plainXml_badReference() throws Exception {
|
||||
String file = writeToTmpFile(RdeTestData.get("deposit_full_badref.xml").read());
|
||||
String file = writeToTmpFile(RdeTestData.loadBytes("deposit_full_badref.xml").read());
|
||||
runCommand("--input=" + file);
|
||||
assertThat(getStdoutAsString()).isEqualTo(""
|
||||
+ "ID: 20101017001\n"
|
||||
|
@ -100,7 +100,7 @@ public class ValidateEscrowDepositCommandTest
|
|||
|
||||
@Test
|
||||
public void testRun_badXml() throws Exception {
|
||||
String file = writeToTmpFile(RdeTestData.loadUtf8("deposit_full.xml").substring(0, 2000));
|
||||
String file = writeToTmpFile(RdeTestData.loadFile("deposit_full.xml").substring(0, 2000));
|
||||
thrown.expect(XmlException.class, "Syntax error at line 46, column 38: "
|
||||
+ "XML document structures must start and end within the same entity.");
|
||||
runCommand("--input=" + file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue