xref: /haiku/src/tests/apps/haikudepot/ValidationFailureTest.h (revision 1a3518cf757c2da8006753f83962da5935bbc82b)
1 /*
2  * Copyright 2019, Andrew Lindesay <apl@lindesay.co.nz>
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef VALIDATION_FAILURE_TEST_H
6 #define VALIDATION_FAILURE_TEST_H
7 
8 #include "Message.h"
9 
10 #include <TestCase.h>
11 #include <TestSuite.h>
12 
13 
14 class ValidationFailureTest : public CppUnit::TestCase {
15 public:
16 								ValidationFailureTest();
17 	virtual						~ValidationFailureTest();
18 
19 			void				TestArchive();
20 			void				TestDearchive();
21 
22 	static	void				AddTests(BTestSuite& suite);
23 
24 private:
25 	static	status_t			FindMessageWithProperty(
26 									const char* property,
27 									BMessage& validationFailuresMessage,
28 									BMessage& validationFailureMessage);
29 	static	void				FindValidationMessages(
30 									BMessage& validationFailureMessage,
31 									BStringList& validationMessages);
32 };
33 
34 
35 #endif	// VALIDATION_FAILURE_TEST_H
36