diff --git a/iceoryx_posh/test/mocks/client_mock.hpp b/iceoryx_posh/test/mocks/client_mock.hpp index 3605c6ec513..987cfa7f6ae 100644 --- a/iceoryx_posh/test/mocks/client_mock.hpp +++ b/iceoryx_posh/test/mocks/client_mock.hpp @@ -71,7 +71,6 @@ class MockClientPortUser : public MockBasePort MOCK_METHOD(bool, isConditionVariableSet, (), (const, noexcept)); }; -template class MockBaseClient { public: diff --git a/iceoryx_posh/test/moduletests/test_popo_client.cpp b/iceoryx_posh/test/moduletests/test_popo_client.cpp new file mode 100644 index 00000000000..60bb205ddc8 --- /dev/null +++ b/iceoryx_posh/test/moduletests/test_popo_client.cpp @@ -0,0 +1,61 @@ +// Copyright (c) 20221 by Apex.AI Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +#include "iceoryx_posh/popo/client.hpp" +#include "iceoryx_posh/testing/mocks/chunk_mock.hpp" +#include "mocks/client_mock.hpp" + +#include "test.hpp" + +namespace +{ +using namespace ::testing; +using namespace iox::capro; +using namespace iox::popo; +using ::testing::_; + +struct DummyRequest +{ + uint64_t data{0}; +}; +struct DummyResponse +{ + uint64_t data{0}; +}; + +using TestClient = ClientImpl; + +class ClientTest : public Test +{ + public: + void SetUp() override + { + } + + void TearDown() override + { + } + + protected: + ChunkMock requestMock; + ChunkMock responseMock; + + ServiceDescription sd{"a one", "a two", "a three"}; + static constexpr uint64_t RESPONSE_QUEUE_CAPACITY{123U}; + ClientOptions options{RESPONSE_QUEUE_CAPACITY}; + TestClient sut{sd, options}; +}; +} // namespace diff --git a/iceoryx_posh/test/moduletests/test_popo_untyped_client.cpp b/iceoryx_posh/test/moduletests/test_popo_untyped_client.cpp index 77a0d51bfd6..8b8cca6e6f4 100644 --- a/iceoryx_posh/test/moduletests/test_popo_untyped_client.cpp +++ b/iceoryx_posh/test/moduletests/test_popo_untyped_client.cpp @@ -27,7 +27,7 @@ using namespace iox::capro; using namespace iox::popo; using ::testing::_; -using TestUntypedClient = iox::popo::UntypedClientImpl>; +using TestUntypedClient = iox::popo::UntypedClientImpl; class UntypedClient_test : public Test {