10#include <catch2/catch_amalgamated.hpp>
23 Network::setLocalMode(
true);
25 SECTION(
"Checking chatBot_nws_yarp device alone")
32 pnws_cfg.put(
"device",
"chatBot_nws_yarp");
33 pnws_cfg.put(
"name",
"/chatBot_nws");
45 SECTION(
"Checking chatBot_nws_yarp device attached to fake device")
53 pnws_cfg.put(
"device",
"chatBot_nws_yarp");
54 pnws_cfg.put(
"name",
"/chatBot_nws");
58 pdev_cfg.put(
"device",
"fakeChatBotDevice");
73 CHECK(Network::connect(
"/test:o",
"/chatBot_nws/text:i"));
75 CHECK(Network::connect(
"/chatBot_nws/text:o",
"/test:i"));
84 CHECK(
resp.get(0).asString() ==
"Hello there.");
98 Network::setLocalMode(
false);
TEST_CASE("dev::chatBot_nws_yarp", "[yarp::dev]")
A container for a device driver.
bool close() override
Close the DeviceDriver.
bool open(const std::string &txt)
Construct and configure a device by its common name.
Helper interface for an object that can wrap/or "attach" to a single other device.
A simple collection of objects that can be described and transmitted in a portable way.
void addString(const char *str)
Places a string in the bottle, at the end of the list.
A mini-server for performing network communication in the background.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
T * read(bool shouldWait=true) override
Read an available object from the port.
void write(bool forceStrict=false)
Write the current object being returned by BufferedPort::prepare.
A mini-server for network communication.
A class for storing options and configuration information.
For streams capable of holding different kinds of content, check what they actually have.
void delay(double seconds)
Wait for a certain number of seconds.
An interface to the operating system, including Port based communication.