Add post processor
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-application.h
1 #ifndef DALI_TOOLKIT_TOOLKIT_APPLICATION_H
2 #define DALI_TOOLKIT_TOOLKIT_APPLICATION_H
3
4 /*
5  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 namespace Dali
22 {
23
24 class Application;
25
26 /**
27  * This creates a stubbed Application so that Application calls work.
28  * Furthermore, it provides an interface to see if certain methods were invoked.
29  */
30 class ToolkitApplication
31 {
32 public: // Construction & Destruction
33
34   ToolkitApplication();
35   ~ToolkitApplication();
36
37 public: // Getters
38
39   Application& GetApplication();
40
41 public: // Signal Emissions
42
43 public: // TEST FUNCTIONS
44
45   // Enumeration of Application methods
46   enum TestFuncEnum
47   {
48   };
49
50   void Reset()
51   {
52     mFunctionsCalled.Reset();
53   }
54
55   bool WasCalled(TestFuncEnum func)
56   {
57     switch(func)
58     {
59     }
60     return false;
61   }
62
63   void ResetCallStatistics(TestFuncEnum func)
64   {
65     switch(func)
66     {
67     }
68   }
69
70 private:
71
72   struct TestFunctions
73   {
74     TestFunctions()
75     {
76     }
77
78     void Reset()
79     {
80     }
81   };
82
83   TestFunctions mFunctionsCalled;
84
85   // The Application Stub
86   Application* mApplicationStub;
87   friend class Application;
88
89 public: // Test static member
90   static bool DECODED_IMAGES_SUPPORTED;
91 };
92
93 } // namespace Dali
94
95 #endif // DALI_TOOLKIT_TOOLKIT_APPLICATION_H