blob: 0fd56f853630a5af258a61e80b7636c56accf479 [file] [log] [blame]
Rolf Badorekef2bf512019-08-20 11:17:15 +03001/*
2 Copyright (c) 2018-2019 Nokia.
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 SHAREDDATALAYER_DATABASECONFIGURATIONMOCK_HPP_
18#define SHAREDDATALAYER_DATABASECONFIGURATIONMOCK_HPP_
19
20#include "private/databaseconfiguration.hpp"
21
22namespace shareddatalayer
23{
24 namespace tst
25 {
26 class DatabaseConfigurationMock: public DatabaseConfiguration
27 {
28 public:
29 MOCK_METHOD1(checkAndApplyDbType, void(const std::string& type));
30 MOCK_METHOD1(checkAndApplyServerAddress, void(const std::string& address));
Rolf Badorek2dcf9402019-10-01 18:33:58 +030031 MOCK_METHOD1(checkAndApplySentinelAddress, void(const std::string& address));
32 MOCK_METHOD1(checkAndApplySentinelMasterName, void(const std::string& name));
Rolf Badorekef2bf512019-08-20 11:17:15 +030033 MOCK_CONST_METHOD0(getDbType, DatabaseConfiguration::DbType());
34 MOCK_CONST_METHOD0(getServerAddresses, DatabaseConfiguration::Addresses());
35 MOCK_CONST_METHOD0(getDefaultServerAddresses, DatabaseConfiguration::Addresses());
36 MOCK_CONST_METHOD0(isEmpty, bool());
Rolf Badorek2dcf9402019-10-01 18:33:58 +030037 MOCK_CONST_METHOD0(getSentinelAddress, boost::optional<HostAndPort>());
38 MOCK_CONST_METHOD0(getSentinelMasterName, std::string());
Rolf Badorekef2bf512019-08-20 11:17:15 +030039 };
40 }
41}
42
43#endif