diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-08-01 21:13:22 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-08-01 21:13:22 +0100 |
commit | 7ca6523bad267ba1d2886f6bfae1e88cfa8f7c24 (patch) | |
tree | e487875de77e8b8d76a3aa31b5b6878a51dcd615 /p2pvr/daemon | |
parent | Temp files for schema should be in bin (diff) | |
download | p2pvr-7ca6523bad267ba1d2886f6bfae1e88cfa8f7c24.tar.bz2 p2pvr-7ca6523bad267ba1d2886f6bfae1e88cfa8f7c24.tar.xz p2pvr-7ca6523bad267ba1d2886f6bfae1e88cfa8f7c24.zip |
Mocks should accept and pass through options for DryIce
Diffstat (limited to 'p2pvr/daemon')
-rw-r--r-- | p2pvr/daemon/unittests/mockDefs.cpp | 15 | ||||
-rw-r--r-- | p2pvr/daemon/unittests/mockDefs.h | 2 |
2 files changed, 10 insertions, 7 deletions
diff --git a/p2pvr/daemon/unittests/mockDefs.cpp b/p2pvr/daemon/unittests/mockDefs.cpp index 49066da..0bba8c0 100644 --- a/p2pvr/daemon/unittests/mockDefs.cpp +++ b/p2pvr/daemon/unittests/mockDefs.cpp @@ -3,24 +3,27 @@ namespace P2PVR { namespace Testing { -SchemaOnlyMockDatabase::SchemaOnlyMockDatabase() : +SchemaOnlyMockDatabase::SchemaOnlyMockDatabase(const Ice::StringSeq & opts) : PQ::Mock("user=postgres dbname=postgres", "postgres", { - rootDir.parent_path().parent_path() / "datasources" / "schema.sql" }) + rootDir.parent_path().parent_path() / "datasources" / "schema.sql" }), + IceTray::DryIce(opts) { } -StandardMockDatabase::StandardMockDatabase() : +StandardMockDatabase::StandardMockDatabase(const Ice::StringSeq & opts) : PQ::Mock("user=postgres dbname=postgres", "postgres", { rootDir.parent_path().parent_path() / "datasources/schema.sql", - rootDir / "datasources" / "data.sql" }) + rootDir / "datasources" / "data.sql" }), + IceTray::DryIce(opts) { } -StandardMockDatabasePlusOffset::StandardMockDatabasePlusOffset() : +StandardMockDatabasePlusOffset::StandardMockDatabasePlusOffset(const Ice::StringSeq & opts) : PQ::Mock("user=postgres dbname=postgres", "postgres", { rootDir.parent_path().parent_path() / "datasources" / "schema.sql", rootDir / "datasources" / "data.sql", - rootDir / "datasources" / "eventOffset.sql" }) + rootDir / "datasources" / "eventOffset.sql" }), + IceTray::DryIce(opts) { } diff --git a/p2pvr/daemon/unittests/mockDefs.h b/p2pvr/daemon/unittests/mockDefs.h index 2874ef1..fa6490c 100644 --- a/p2pvr/daemon/unittests/mockDefs.h +++ b/p2pvr/daemon/unittests/mockDefs.h @@ -8,7 +8,7 @@ namespace P2PVR { namespace Testing { -#define DECLAREMOCK(Name) class DLL_PUBLIC Name : public PQ::Mock, public IceTray::DryIce { public: Name(); } +#define DECLAREMOCK(Name) class DLL_PUBLIC Name : public PQ::Mock, public IceTray::DryIce { public: Name(const Ice::StringSeq & opts = {}); } DECLAREMOCK(SchemaOnlyMockDatabase); DECLAREMOCK(StandardMockDatabase); |