4 #include <gtest/gtest.h>
7 TEST(BadInputs, Subtest_1) {
9 EXPECT_EQ(A1.
code(), INVALID_COMMAND);
12 "TRAJECTORIES_NUMBER TRAJECTORIES_NUMBER 5 TRAJECTORIES_NUMBER 12");
13 EXPECT_EQ(B1.
code(), INVALID_COMMAND);
15 Command C1(
"GENERATE_TRAJECTORIES TRAJECTORIES_NUMBER 5");
16 EXPECT_EQ(C1.
code(), INVALID_COMMAND);
18 Command D1(
"GENERATE_TRAJECTORIES TRAJECTORIES_NUMBER 5 STEPS_NUMBER 12a");
19 EXPECT_EQ(D1.
code(), INVALID_COMMAND);
22 TEST(IsCorrectData, Subtest_2) {
24 "BLACK_SCHOLES INTEREST_RATE 0.14 SIGMA 0.8 EXP_T 1. SPOT_PRICE 1.");
26 "{code: 0, keyNumbers: [EXP_T] = 1.; [INTEREST_RATE] = 0.14; [SIGMA] = 0.8; [SPOT_PRICE] = 1.; }");
29 "EURO_CALL ERROR 0.01 STRIKE_PRICE 100 TRAJECTORIES_NUMBER 100 STEPS_NUMBER 1000 EXP_T 1. SPOT_PRICE 100.");
31 "{code: 5, keyNumbers: [ERROR] = 0.01; [EXP_T] = 1.; [SPOT_PRICE] = 100.; [STEPS_NUMBER] = 1000; [STRIKE_PRICE] = 100; [TRAJECTORIES_NUMBER] = 100; }");
Container for the commands Class contains the parsed command.
std::string to_json() const
TEST(BadInputs, Subtest_1)