summaryrefslogtreecommitdiff
path: root/lib/backupstore/StoreTestUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/backupstore/StoreTestUtils.h')
-rw-r--r--lib/backupstore/StoreTestUtils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/backupstore/StoreTestUtils.h b/lib/backupstore/StoreTestUtils.h
index 3365a7f4..d8655e63 100644
--- a/lib/backupstore/StoreTestUtils.h
+++ b/lib/backupstore/StoreTestUtils.h
@@ -75,5 +75,10 @@ bool create_account(int soft, int hard);
//! Deletes the standard test account, for testing behaviour with no account.
bool delete_account();
+#define TEST_COMMAND_RETURNS_ERROR(command, error) \
+ TEST_CHECK_THROWS(command, ConnectionException, \
+ Conn_Protocol_UnexpectedReply); \
+ TEST_EQUAL(BackupProtocolError::error, protocol.GetLastErrorType());
+
#endif // STORETESTUTILS__H