xrpld
Loading...
Searching...
No Matches
Connect_test.cpp
1
2#include <test/jtx/Env.h>
3
4#include <xrpl/beast/unit_test/suite.h>
5#include <xrpl/protocol/jss.h>
6
7namespace xrpl {
8
10{
11 void
13 {
14 testcase("Errors");
15
16 using namespace test::jtx;
17
18 {
19 // standalone mode should fail
20 Env env{*this};
21 BEAST_EXPECT(env.app().config().standalone());
22
23 auto const result = env.rpc("json", "connect", "{}");
24 BEAST_EXPECT(result[jss::result][jss::status] == "error");
25 BEAST_EXPECT(result[jss::result].isMember(jss::error));
26 BEAST_EXPECT(result[jss::result][jss::error] == "notSynced");
27 BEAST_EXPECT(result[jss::result][jss::error_message] == "Not synced to the network.");
28 }
29 }
30
31public:
32 void
33 run() override
34 {
35 testErrors();
36 }
37};
38
40
41} // namespace xrpl
A testsuite class.
Definition suite.h:50
TestcaseT testcase
Memberspace for declaring test cases.
Definition suite.h:149
void run() override
Runs the suite.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
BEAST_DEFINE_TESTSUITE(AccountTxPaging, app, xrpl)