20TEST(TransactionsAMMCreateTests, BuilderSettersRoundTrip)
23 auto const [publicKey, secretKey] =
47 auto tx = builder.build(publicKey, secretKey);
50 EXPECT_TRUE(tx.validate(reason)) << reason;
53 EXPECT_FALSE(tx.getSigningPubKey().empty());
54 EXPECT_TRUE(tx.hasTxnSignature());
57 EXPECT_EQ(tx.getAccount(), accountValue);
58 EXPECT_EQ(tx.getSequence(), sequenceValue);
59 EXPECT_EQ(tx.getFee(), feeValue);
63 auto const& expected = amountValue;
64 auto const actual = tx.getAmount();
69 auto const& expected = amount2Value;
70 auto const actual = tx.getAmount2();
75 auto const& expected = tradingFeeValue;
76 auto const actual = tx.getTradingFee();
85TEST(TransactionsAMMCreateTests, BuilderFromStTxRoundTrip)
88 auto const [publicKey, secretKey] =
112 auto initialTx = initialBuilder.build(publicKey, secretKey);
117 auto rebuiltTx = builderFromTx.
build(publicKey, secretKey);
120 EXPECT_TRUE(rebuiltTx.validate(reason)) << reason;
123 EXPECT_EQ(rebuiltTx.getAccount(), accountValue);
124 EXPECT_EQ(rebuiltTx.getSequence(), sequenceValue);
125 EXPECT_EQ(rebuiltTx.getFee(), feeValue);
129 auto const& expected = amountValue;
130 auto const actual = rebuiltTx.getAmount();
135 auto const& expected = amount2Value;
136 auto const actual = rebuiltTx.getAmount2();
141 auto const& expected = tradingFeeValue;
142 auto const actual = rebuiltTx.getTradingFee();