• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright (C) 2013 The Android Open Source Project
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 #ifndef SHILL_MOCK_EAP_CREDENTIALS_H_
18 #define SHILL_MOCK_EAP_CREDENTIALS_H_
19 
20 #include <map>
21 #include <string>
22 #include <vector>
23 
24 #include "shill/eap_credentials.h"
25 
26 #include <gmock/gmock.h>
27 
28 namespace shill {
29 
30 class MockEapCredentials : public EapCredentials {
31  public:
32   MockEapCredentials();
33   ~MockEapCredentials() override;
34 
35   MOCK_CONST_METHOD0(IsConnectable, bool());
36   MOCK_CONST_METHOD0(IsConnectableUsingPassphrase, bool());
37   MOCK_METHOD2(Load, void(StoreInterface* store, const std::string& id));
38   MOCK_CONST_METHOD2(OutputConnectionMetrics,
39                      void(Metrics* metrics, Technology::Identifier technology));
40   MOCK_CONST_METHOD2(PopulateSupplicantProperties,
41                      void(CertificateFile* certificate_file,
42                           KeyValueStore* params));
43   MOCK_CONST_METHOD1(PopulateWiMaxProperties, void(KeyValueStore* params));
44   MOCK_CONST_METHOD3(Save, void(
45       StoreInterface* store, const std::string& id, bool save_credentials));
46   MOCK_METHOD0(Reset, void());
47   MOCK_METHOD2(SetKeyManagement, bool(const std::string& key_management,
48                                       Error* error));
49   MOCK_CONST_METHOD0(identity, const std::string&());
50   MOCK_CONST_METHOD0(key_management, const std::string&());
51   MOCK_METHOD1(set_password, void(const std::string& password));
52   MOCK_CONST_METHOD0(pin, const std::string&());
53 
54  private:
55   std::string kDefaultKeyManagement;
56 
57   DISALLOW_COPY_AND_ASSIGN(MockEapCredentials);
58 };
59 
60 }  // namespace shill
61 
62 #endif  // SHILL_MOCK_EAP_CREDENTIALS_H_
63