// remove data that isn't there // add too much data TEST_CASE("manage data", "[tx][managedata]") { Config const& cfg = getTestConfig(); VirtualClock clock; ApplicationEditableVersion app{clock, cfg}; auto& db = app.getDatabase(); app.start(); // set up world auto root = TestAccount::createRoot(app); const int64_t minBalance = app.getLedgerManager().getMinBalance(3) - 100; auto gateway = root.create("gw", minBalance); DataValue value, value2; value.resize(64); value2.resize(64); for (int n = 0; n < 64; n++) { value[n] = (unsigned char)n; value2[n] = (unsigned char)n + 3; } std::string t1("test"); std::string t2("test2"); std::string t3("test3");
typedef std::unique_ptr<Application> appPtr; TEST_CASE("change trust", "[tx][changetrust]") { Config const& cfg = getTestConfig(); VirtualClock clock; ApplicationEditableVersion app{clock, cfg}; Database& db = app.getDatabase(); app.start(); // set up world auto root = TestAccount::createRoot(app); auto const minBalance2 = app.getLedgerManager().getMinBalance(2); auto gateway = root.create("gw", minBalance2); Asset idrCur = makeAsset(gateway, "IDR"); SECTION("basic tests") { // create a trustline with a limit of 0 REQUIRE_THROWS_AS(root.changeTrust(idrCur, 0), ex_CHANGE_TRUST_INVALID_LIMIT); // create a trustline with a limit of 100 root.changeTrust(idrCur, 100); // fill it to 90 gateway.pay(root, idrCur, 90);