Define a base TestException class
[platform/core/test/security-tests.git] / src / framework / include / dpl / test / test_exception.h
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /**
17  * @file        test_exception.h
18  * @author      Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
19  * @version     1.0
20  * @brief       This file is the header file of test_exception base class
21  */
22
23 #ifndef DPL_TEST_EXCEPTION_H
24 #define DPL_TEST_EXCEPTION_H
25
26 #include <string>
27
28 namespace DPL {
29 namespace Test {
30
31 class TestException
32 {
33     public:
34         std::string GetMessage() const
35         {
36             return m_message;
37         }
38
39     protected:
40         std::string m_message;
41
42         TestException() {}
43         TestException(const std::string &message) :
44             m_message(message) {}
45
46 };
47
48 } // namespace Test
49 } // namespace DPL
50
51 #endif // DPL_TEST_EXCEPTION_H