Skip to content

Commit

Permalink
dev: Test TestProjectPersistence.
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmin42 committed Jan 11, 2024
1 parent 77b5b71 commit a8bd4fd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PB/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ set_target_properties(pblib PROPERTIES LINKER_LANGUAGE CXX)
if (LOG_LEVEL MATCHES Debug)
add_executable(pbtests
tests/MockListeners.h

tests/MockListeners.cpp
tests/TestPersistence.cpp
tests/TestIteratorWithState.cpp
Expand All @@ -185,6 +184,7 @@ if (LOG_LEVEL MATCHES Debug)
tests/TestImageMonitor.cpp
tests/TestParallelTaskConsumer.cpp
tests/TestPathCache.cpp
tests/TestPersistenceProject.cpp
tests/TestPhotobook.cpp
tests/TestProjectPersistence.cpp
tests/TestSequenctialTaskConsumer.cpp
Expand Down
11 changes: 11 additions & 0 deletions PB/tests/MockListeners.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,14 @@ class TestPersistenceMetadataListener final
MOCK_METHOD(void, onMetadataRead, (BimapWorkaround), (override));
MOCK_METHOD(void, onMetadataPersistenceError, (PBDev::Error), (override));
};


class TestProjectPersistenceListenerListener final
: public PB::ProjectPersistenceListener
{
MOCK_METHOD(void, onMetadataUpdated, (), (override));
MOCK_METHOD(void, onProjectRead, (), (override));
MOCK_METHOD(void, onProjectRenamed, (), (override));
MOCK_METHOD(void, onPersistenceError, (PBDev::Error), (override));
};

10 changes: 10 additions & 0 deletions PB/tests/TestPersistenceProject.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include "MockListeners.h"

#include <pb/Config.h>
#include <pb/persistence/ProjectPersistence.h>


TEST(ProjectPersistence, Test0)
{

}

0 comments on commit a8bd4fd

Please sign in to comment.