20TEST(TransactionsSignerListSetTests, BuilderSettersRoundTrip)
23 auto const [publicKey, secretKey] =
43 builder.setSignerEntries(signerEntriesValue);
45 auto tx = builder.build(publicKey, secretKey);
48 EXPECT_TRUE(tx.validate(reason)) << reason;
51 EXPECT_FALSE(tx.getSigningPubKey().empty());
52 EXPECT_TRUE(tx.hasTxnSignature());
55 EXPECT_EQ(tx.getAccount(), accountValue);
56 EXPECT_EQ(tx.getSequence(), sequenceValue);
57 EXPECT_EQ(tx.getFee(), feeValue);
61 auto const& expected = signerQuorumValue;
62 auto const actual = tx.getSignerQuorum();
68 auto const& expected = signerEntriesValue;
69 auto const actualOpt = tx.getSignerEntries();
70 ASSERT_TRUE(actualOpt.has_value()) <<
"Optional field sfSignerEntries should be present";
72 EXPECT_TRUE(tx.hasSignerEntries());
79TEST(TransactionsSignerListSetTests, BuilderFromStTxRoundTrip)
82 auto const [publicKey, secretKey] =
102 initialBuilder.setSignerEntries(signerEntriesValue);
104 auto initialTx = initialBuilder.build(publicKey, secretKey);
109 auto rebuiltTx = builderFromTx.
build(publicKey, secretKey);
112 EXPECT_TRUE(rebuiltTx.validate(reason)) << reason;
115 EXPECT_EQ(rebuiltTx.getAccount(), accountValue);
116 EXPECT_EQ(rebuiltTx.getSequence(), sequenceValue);
117 EXPECT_EQ(rebuiltTx.getFee(), feeValue);
121 auto const& expected = signerQuorumValue;
122 auto const actual = rebuiltTx.getSignerQuorum();
128 auto const& expected = signerEntriesValue;
129 auto const actualOpt = rebuiltTx.getSignerEntries();
130 ASSERT_TRUE(actualOpt.has_value()) <<
"Optional field sfSignerEntries should be present";