Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

34 righe
893 B

  1. #include <cpphibernate/driver/mariadb.h>
  2. #include "test_helper.h"
  3. #include "test_schema.h"
  4. #include "mariadb_mock.h"
  5. using namespace ::testing;
  6. using namespace ::cpphibernate;
  7. TEST(CppHibernateTests, read_test1)
  8. {
  9. StrictMock<mariadb_mock> mock;
  10. // expect_query(mock, "START TRANSACTION");
  11. // expect_query(mock, "COMMIT");
  12. EXPECT_CALL(
  13. mock,
  14. mysql_close(
  15. reinterpret_cast<MYSQL*>(0x1111)));
  16. EXPECT_CALL(
  17. mock,
  18. mysql_real_escape_string(reinterpret_cast<MYSQL*>(0x1111), _, _, _))
  19. .Times(AnyNumber())
  20. .WillRepeatedly(WithArgs<1, 2, 3>(EscapeString()));
  21. test1 t1;
  22. t1.id = uuid("1e133ad8-ad2e-11e8-98d0-529269fb1459");
  23. ::cppmariadb::connection connection(reinterpret_cast<MYSQL*>(0x1111));
  24. auto context = make_context<driver::mariadb>(test_schema, connection);
  25. context.read(t1);
  26. }