7 TEST (MySQLSessionTest,CheckMySQLConnectionWithCorrectConnectionParameters) {
10 bool isConnected =
false;
12 EXPECT_EQ (isConnected,
true);
16 TEST (MySQLSessionTest,CheckMySQLConnectionWithIncorrectConnectionParameters) {
24 std::vector<person>::const_iterator it = people.begin();
25 EXPECT_EQ (it->get<0>(),1);
26 EXPECT_STREQ (it->get<1>().c_str(),
"Person1");
28 EXPECT_EQ (it->get<0>(),2);
29 EXPECT_STREQ (it->get<1>().c_str(),
"Person2");
35 std::vector<person_name>::const_iterator it = namesOfPersons.begin();
36 EXPECT_STREQ (it->get<0>().c_str(),
"Person1");
38 EXPECT_STREQ (it->get<0>().c_str(),
"Person2");
65 std::vector<Object>::const_iterator it = objects.begin();
67 EXPECT_STREQ (it->name.c_str(),
"Object3");
76 TEST (SQLiteSessionTest,CheckSQLiteConnectionWithCorrectConnectionParameters) {
79 bool isConnected =
false;
81 EXPECT_EQ (isConnected,
true);
88 std::vector<person>::const_iterator it = people.begin();
89 EXPECT_EQ (it->get<0>(),1);
90 EXPECT_STREQ (it->get<1>().c_str(),
"Person1");
92 EXPECT_EQ (it->get<0>(),2);
93 EXPECT_STREQ (it->get<1>().c_str(),
"Person2");
99 std::vector<person_name>::const_iterator it = namesOfPersons.begin();
100 EXPECT_STREQ (it->get<0>().c_str(),
"Person1");
102 EXPECT_STREQ (it->get<0>().c_str(),
"Person2");
129 std::vector<Object>::const_iterator it = objects.begin();
130 EXPECT_EQ (it->id,3);
131 EXPECT_STREQ (it->name.c_str(),
"Object3");
137 int main(
int argc,
char **argv) {
138 ::testing::InitGoogleTest(&argc, argv);
139 return RUN_ALL_TESTS();