[dali_2.3.20] Merge branch 'devel/master'
[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) 2024 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 class Application;
24
25 /**
26  * This creates a stubbed Application so that Application calls work.
27  * Furthermore, it provides an interface to see if certain methods were invoked.
28  */
29 class ToolkitApplication
30 {
31 public: // Construction & Destruction
32   ToolkitApplication();
33   ~ToolkitApplication();
34
35 public: // Getters
36   Application& GetApplication();
37
38 public: // Signal Emissions
39 public: // TEST FUNCTIONS
40   // Enumeration of Application methods
41   enum TestFuncEnum
42   {
43   };
44
45   void Reset()
46   {
47     mFunctionsCalled.Reset();
48   }
49
50   bool WasCalled(TestFuncEnum func)
51   {
52     switch(func)
53     {
54     }
55     return false;
56   }
57
58   void ResetCallStatistics(TestFuncEnum func)
59   {
60     switch(func)
61     {
62     }
63   }
64
65 private:
66   struct TestFunctions
67   {
68     TestFunctions()
69     {
70     }
71
72     void Reset()
73     {
74     }
75   };
76
77   TestFunctions mFunctionsCalled;
78
79   // The Application Stub
80   Application* mApplicationStub;
81   friend class Application;
82
83 public: // Test static member
84   static bool DECODED_IMAGES_SUPPORTED;
85   static bool ADD_IDLE_SUCCESS; ///< Default as true.
86 };
87
88 } // namespace Dali
89
90 #endif // DALI_TOOLKIT_TOOLKIT_APPLICATION_H