computer_endpoints.cpp
Go to the documentation of this file.
1 
11 #include "common.h"
12 
13 #include <opc/ua/client/remote_server.h>
14 
15 #include <stdexcept>
16 
17 using namespace OpcUa;
18 
19 class Endpoints : public ::testing::Test
20 {
21 protected:
22  virtual void SetUp()
23  {
24  std::unique_ptr<OpcUa::Services> computer = OpcUa::Connect(GetEndpoint());
25  Server = computer->Endpoints();
26  }
27 
28  virtual void TearDown()
29  {
30  Server = std::unique_ptr<EndpointServices>();
31  }
32 
33 protected:
34  std::shared_ptr<EndpointServices> Server;
35 };
36 
37 
38 TEST_F(Endpoints, GetEndpoints)
39 {
40  EndpointsFilter filter;
41  const std::vector<EndpointDescription> endpoints = Server->GetEndpoints(filter);
42  ASSERT_FALSE(endpoints.empty());
43 }
44 
virtual void TearDown()
virtual void SetUp()
OPC UA Address space part. GNU LGPL.
std::shared_ptr< EndpointServices > Server
EndpointDescription GetEndpoint(OpcUa::Binary::IOStream &stream)
std::unique_ptr< RemoteConnection > Connect(const std::string &host, unsigned port, const Common::Logger::SharedPtr &logger)
TEST_F(Endpoints, GetEndpoints)
#define ASSERT_FALSE(condition)
computer
Definition: test.py:6


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Tue Jan 19 2021 03:06:04