feat: Integrationstest mit initRegelwerk() + DummyDB komplettiert
CI / ubuntu-latest · Clang · C++17 (push) Has been cancelled
Code Quality / cppcheck (push) Has been cancelled

This commit is contained in:
grok-bot committed 2026-05-31 16:14:46 +02:00
1 parent f8d318e388
commit 9d0dac6149
6 files changed
+42 -4

No files matched your search

+9 -3
View File
@@ -158,7 +158,13 @@ if(BUILD_TESTS)
target_link_libraries(actions_test PRIVATE rw_core)
add_test(NAME actions_test COMMAND actions_test)
# Phase 3 — Integrationstest erfordert initRegelwerk() + DB-Zugriff
# (Oracle/Sybase-Abhängigkeiten verhindern isolierten Build)
# Status: Analyse abgeschlossen — siehe docs/REFACTORING.md
# Phase 3 — Integrationstest (mit initRegelwerk())
add_executable(integration_test tests/integration_test.cpp src/core/initrw.cpp
src/db/msdbconnection.cpp src/db/msdb_dummy.cpp
src/util/msgetopt.cpp
tests/xml_vq_data_stub.cpp
)
target_include_directories(integration_test PRIVATE ${CATCH2_INCLUDE_DIR})
target_link_libraries(integration_test PRIVATE rw_core)
add_test(NAME integration_test COMMAND integration_test)
endif()
+1
View File
@@ -231,6 +231,7 @@ rw_sources(
rest/rw_aussetzung.cpp
rest/rw_konfaussetzung.cpp
rest/rw_konstanten.cpp
rest/wop_win.cpp
# === aktsource/ — Generated catalog code ===
aktsource/godata.cpp
+2 -1
View File
@@ -48,7 +48,8 @@ double DummyDBConnection::doubleValue(const char*) { return 0.0; }
const char* DummyDBConnection::dateValue(const char*, const char*) { return "01.01.1900"; }
long long DummyDBConnection::int64Value(const char*) { return 0; }
bool DummyDBConnection::existsTable(const std::string&) { return false; }
bool DummyDBConnection::existsAttribut(const std::string& attr) { return false; }
bool DummyDBConnection::existsTable(const std::string& tab_name) { return false; }
bool DummyDBConnection::existsColumn(const std::string&, const std::string&) { return false; }
bool DummyDBConnection::existsProcedure(const std::string&) { return false; }
+1
View File
@@ -46,6 +46,7 @@ public:
const char* dateValue(const char* attr, const char* dateformat = "dd.mm.yyyy") override;
long long int64Value(const char* attr) override;
bool existsAttribut(const std::string& attr) override;
bool existsTable(const std::string& tab_name) override;
bool existsColumn(const std::string& tab_name, const std::string& col_name) override;
bool existsProcedure(const std::string& proc_name) override;
+15
View File
@@ -0,0 +1,15 @@
//*****************************************************************************
// Minimaler Integrationstest: initRegelwerk()
//*****************************************************************************
#define CATCH_CONFIG_MAIN
#include "catch2/catch_amalgamated.hpp"
#include "initrw.hpp"
using namespace maatini::rw;
TEST_CASE("initRegelwerk: Initialisierung ohne Fehler", "[integration]") {
bool ok = initRegelwerk();
REQUIRE(ok);
}
+14
View File
@@ -0,0 +1,14 @@
// Dummy-Stub: xml_vq_data für Integrationstests (ohne Oracle/Sybase)
#include <string>
#include "xml/xml_vq_data.hpp"
#include "db/msdbconnection.hpp"
namespace maatini { namespace rw {
std::string xmlVQData(MSDBConnection&, int) {
return "";
}
void test_VQData() {}
}}