blob: fa7d76f03e5d3d7e75c5c5edc85c2da679b90b6d [file] [log] [blame]
Zang MingJie117aae32021-10-27 10:02:06 +08001/*
2 * Copyright (c) 2021 Project CHIP Authors
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#pragma once
17
18#include <messaging/tests/MessagingContext.h>
Zang MingJie117aae32021-10-27 10:02:06 +080019
Zang MingJie117aae32021-10-27 10:02:06 +080020namespace chip {
21namespace Test {
22
23/**
24 * @brief The context of test cases for messaging layer. It wil initialize network layer and system layer, and create
25 * two secure sessions, connected with each other. Exchanges can be created for each secure session.
26 */
Zang MingJie4aa0d5f2022-04-22 21:22:42 +080027class AppContext : public LoopbackMessagingContext
Zang MingJie117aae32021-10-27 10:02:06 +080028{
Zang MingJie4aa0d5f2022-04-22 21:22:42 +080029 typedef LoopbackMessagingContext Super;
Boris Zbarskyaf77cc92021-12-02 16:31:09 -050030
Zang MingJie117aae32021-10-27 10:02:06 +080031public:
Boris Zbarskyaf77cc92021-12-02 16:31:09 -050032 /// Initialize the underlying layers.
33 CHIP_ERROR Init() override;
Zang MingJie117aae32021-10-27 10:02:06 +080034
35 // Shutdown all layers, finalize operations
Boris Zbarskyaf77cc92021-12-02 16:31:09 -050036 CHIP_ERROR Shutdown() override;
Zang MingJie117aae32021-10-27 10:02:06 +080037};
38
39} // namespace Test
40} // namespace chip