OLD | NEW |
| (Empty) |
1 // Copyright (c) 2010 The Ginsu Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef C_SALT_INTEGRATION_TESTS_FAKE_INSTANCE_H_ | |
6 #define C_SALT_INTEGRATION_TESTS_FAKE_INSTANCE_H_ | |
7 | |
8 #include "boost/shared_ptr.hpp" | |
9 #include "c_salt/instance.h" | |
10 #include "c_salt/integration_tests/method_tester.h" | |
11 #include "c_salt/integration_tests/property_tester.h" | |
12 | |
13 class FakeInstance : public c_salt::Instance { | |
14 public: | |
15 explicit FakeInstance(const NPP& npp_instance); | |
16 virtual ~FakeInstance(); | |
17 | |
18 // Specialization of c_salt::Instance | |
19 virtual void InitializeMethods(c_salt::ScriptingBridge* bridge); | |
20 virtual void InitializeProperties(c_salt::ScriptingBridge* bridge); | |
21 | |
22 private: | |
23 FakeInstance(); // Not implemented, do not use. | |
24 | |
25 // ScriptableNativeObjects for testing c_salt features. | |
26 boost::shared_ptr<MethodTester> method_tester_; | |
27 boost::shared_ptr<PropertyTester> property_tester_; | |
28 | |
29 // Getters for tester objects. These are exposed via the ScriptingBridge. | |
30 boost::shared_ptr<MethodTester> GetMethodTester(); | |
31 boost::shared_ptr<PropertyTester> GetPropertyTester(); | |
32 }; | |
33 | |
34 #endif // C_SALT_INTEGRATION_TESTS_FAKE_INSTANCE_H_ | |
OLD | NEW |