Isolate Application object in Env:

This change causes each instance of Env to construct its own
isolated Application object for testing. Also included is
part of a framework to create multiple Application objects
in the same unit test and connect them together.
This commit is contained in:
Vinnie Falco
2015-09-17 10:18:01 -07:00
parent 19903674af
commit 9315d98aa9
20 changed files with 630 additions and 368 deletions

View File

@@ -49,7 +49,7 @@ struct Regression_test : public beast::unit_test::suite
// be reproduced against an open ledger. Make a local
// closed ledger and work with it directly.
auto closed = std::make_shared<Ledger>(
create_genesis, env.config, env.app().family());
create_genesis, env.app().config(), env.app().family());
auto expectedDrops = SYSTEM_CURRENCY_START;
expect(closed->info().drops == expectedDrops);
@@ -67,7 +67,7 @@ struct Regression_test : public beast::unit_test::suite
auto const result = ripple::apply(env.app(),
accum, *jt.stx, tapENABLE_TESTING,
directSigVerify, env.config,
directSigVerify, env.app().config(),
env.journal);
expect(result.first == tesSUCCESS);
expect(result.second);
@@ -95,7 +95,7 @@ struct Regression_test : public beast::unit_test::suite
auto const result = ripple::apply(env.app(),
accum, *jt.stx, tapENABLE_TESTING,
directSigVerify, env.config,
directSigVerify, env.app().config(),
env.journal);
expect(result.first == tecINSUFF_FEE);
expect(result.second);