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