added backend test service for tests

This commit is contained in:
Sascha Kühl 2025-02-07 11:50:06 +01:00
parent 9e60b5e485
commit 2e5257a5fa
1 changed files with 6 additions and 0 deletions

View File

@ -1,11 +1,15 @@
#include <catch2/catch_test_macros.hpp>
#include "matador/sql/backend_provider.hpp"
#include "matador/sql/connection.hpp"
#include "matador/query/query.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/author.hpp"
#include "../../models/book.hpp"
@ -17,6 +21,7 @@
using namespace matador::object;
using namespace matador::orm;
using namespace matador::sql;
using namespace matador::test;
TEST_CASE("Create sql query data for entity with eager has one", "[query][entity][builder]") {
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]") {
using namespace matador::test;
backend_provider::instance().register_backend("noop", std::make_unique<orm::test_backend_service>());
connection db("noop://noop.db");
schema scm("noop");
auto result = scm.attach<author>("authors")