Daggerize TMCH/signed mark util classes

This allows them to support injectable configuration.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143709052
This commit is contained in:
mcilwain 2017-01-05 14:26:18 -08:00 committed by Ben McIlwain
parent 534e3ba01c
commit c05424b947
19 changed files with 242 additions and 165 deletions

View file

@ -277,7 +277,7 @@ public abstract class FlowTestCase<F extends Flow> extends ShardableTestCase {
.isEqualTo(new TypeInstantiator<F>(getClass()){}.getExactType());
// Run the flow.
return DaggerEppTestComponent.builder()
.fakesAndMocksModule(new FakesAndMocksModule(clock))
.fakesAndMocksModule(new FakesAndMocksModule(clock, tmchCaTestingMode))
.build()
.startRequest()
.flowComponentBuilder()
@ -339,6 +339,12 @@ public abstract class FlowTestCase<F extends Flow> extends ShardableTestCase {
return output;
}
private boolean tmchCaTestingMode = true;
protected void useTmchProdCert() {
tmchCaTestingMode = false;
}
public EppOutput dryRunFlowAssertResponse(String xml, String... ignoredPaths) throws Exception {
List<Object> beforeEntities = ofy().load().list();
EppOutput output =