MCPcopy Create free account
hub / github.com/catchorg/Catch2 / DBConnection

Class DBConnection

examples/110-Fix-ClassFixture.cpp:19–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17#include <catch2/catch_test_macros.hpp>
18
19class DBConnection
20{
21public:
22 static DBConnection createConnection( std::string const & /*dbName*/ ) {
23 return DBConnection();
24 }
25
26 bool executeSQL( std::string const & /*query*/, int const /*id*/, std::string const & arg ) {
27 if ( arg.length() == 0 ) {
28 throw std::logic_error("empty SQL query argument");
29 }
30 return true; // ok
31 }
32};
33
34class UniqueTestsFixture
35{

Callers 1

createConnectionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected