added backend test service for tests
This commit is contained in:
parent
9e60b5e485
commit
2e5257a5fa
|
|
@ -1,11 +1,15 @@
|
||||||
#include <catch2/catch_test_macros.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
|
#include "matador/sql/backend_provider.hpp"
|
||||||
#include "matador/sql/connection.hpp"
|
#include "matador/sql/connection.hpp"
|
||||||
|
|
||||||
#include "matador/query/query.hpp"
|
#include "matador/query/query.hpp"
|
||||||
|
|
||||||
#include "matador/orm/session_query_builder.hpp"
|
#include "matador/orm/session_query_builder.hpp"
|
||||||
|
|
||||||
|
#include "../backend/test_connection.hpp"
|
||||||
|
#include "../backend/test_backend_service.hpp"
|
||||||
|
|
||||||
#include "../../models/airplane.hpp"
|
#include "../../models/airplane.hpp"
|
||||||
#include "../../models/author.hpp"
|
#include "../../models/author.hpp"
|
||||||
#include "../../models/book.hpp"
|
#include "../../models/book.hpp"
|
||||||
|
|
@ -17,6 +21,7 @@
|
||||||
using namespace matador::object;
|
using namespace matador::object;
|
||||||
using namespace matador::orm;
|
using namespace matador::orm;
|
||||||
using namespace matador::sql;
|
using namespace matador::sql;
|
||||||
|
using namespace matador::test;
|
||||||
|
|
||||||
TEST_CASE("Create sql query data for entity with eager has one", "[query][entity][builder]") {
|
TEST_CASE("Create sql query data for entity with eager has one", "[query][entity][builder]") {
|
||||||
using namespace matador::test;
|
using namespace matador::test;
|
||||||
|
|
@ -64,6 +69,7 @@ TEST_CASE("Create sql query data for entity with eager has one", "[query][entity
|
||||||
|
|
||||||
TEST_CASE("Create sql query data for entity with eager belongs to", "[query][entity][builder]") {
|
TEST_CASE("Create sql query data for entity with eager belongs to", "[query][entity][builder]") {
|
||||||
using namespace matador::test;
|
using namespace matador::test;
|
||||||
|
backend_provider::instance().register_backend("noop", std::make_unique<orm::test_backend_service>());
|
||||||
connection db("noop://noop.db");
|
connection db("noop://noop.db");
|
||||||
schema scm("noop");
|
schema scm("noop");
|
||||||
auto result = scm.attach<author>("authors")
|
auto result = scm.attach<author>("authors")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue