parameter_reader_mock.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
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  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 #include <gmock/gmock.h>
18 
19 #include <string>
20 
21 namespace Aws
22 {
23 namespace Client
24 {
25 
26 const ParameterPath user_id_key{"lex_configuration", "user_id"};
27 const ParameterPath bot_name_key{"lex_configuration", "bot_name"};
28 const ParameterPath bot_alias_key{"lex_configuration", "bot_alias"};
29 
31  const AwsError user_id_error,
32  const AwsError bot_name_error,
33  const AwsError bot_alias_error,
34  ParameterReaderMock & mock_reader)
35 {
36  using testing::Return;
37  using testing::_;
38  using testing::Eq;
39  EXPECT_CALL(mock_reader, ReadParam(Eq(user_id_key), testing::A<std::string&>()))
40  .WillOnce(Return(user_id_error));
41  EXPECT_CALL(mock_reader, ReadParam(Eq(bot_name_key), testing::A<std::string&>()))
42  .WillOnce(Return(bot_name_error));
43  EXPECT_CALL(mock_reader, ReadParam(Eq(bot_alias_key), testing::A<std::string&>()))
44  .WillOnce(Return(bot_alias_error));
45 }
46 
47 } // namespace Client
48 } // namespace Aws
void SetupMockReader(AwsError user_id_error, AwsError bot_name_error, AwsError bot_alias_error, ParameterReaderMock &mock_reader)
const ParameterPath bot_alias_key
const ParameterPath user_id_key
const ParameterPath bot_name_key


lex_common
Author(s): AWS RoboMaker
autogenerated on Sat Mar 6 2021 03:43:24