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 14class ValidationFailureTest : public CppUnit::TestCase { 15public: 16 ValidationFailureTest(); 17 virtual ~ValidationFailureTest(); 18 19 void TestArchive(); 20 void TestDearchive(); 21 22 static void AddTests(BTestSuite& suite); 23 24private: 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