mirror of
https://github.com/google/nomulus.git
synced 2025-07-24 03:30:46 +02:00
Move tests to use TestDataHelper for reading resources
TestDataHelper is build exactly to prevent direct reads of resources. It caches the resources and makes sure they are in the correct directory. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=191785004
This commit is contained in:
parent
e5c0a85b3b
commit
6699915132
16 changed files with 70 additions and 78 deletions
|
@ -15,7 +15,7 @@
|
|||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.util.ResourceUtils.readResourceBytes;
|
||||
import static google.registry.testing.TestDataHelper.loadBytes;
|
||||
|
||||
import com.google.common.io.ByteSource;
|
||||
import com.google.common.io.Files;
|
||||
|
@ -39,8 +39,7 @@ public class EncryptEscrowDepositCommandTest
|
|||
@Rule
|
||||
public final BouncyCastleProviderRule bouncy = new BouncyCastleProviderRule();
|
||||
|
||||
private final ByteSource depositXml =
|
||||
readResourceBytes(RdeTestData.class, "testdata/deposit_full.xml");
|
||||
private final ByteSource depositXml = loadBytes(RdeTestData.class, "deposit_full.xml");
|
||||
|
||||
static EscrowDepositEncryptor createEncryptor() {
|
||||
EscrowDepositEncryptor res = new EscrowDepositEncryptor();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue