MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / TEST_F

Function TEST_F

dependencies/hueplusplus-1.0.0/test/test_Bridge.cpp:65–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63};
64
65TEST_F(BridgeFinderTest, findBridges)
66{
67 BridgeFinder finder(handler);
68 std::vector<BridgeFinder::BridgeIdentification> bridges = finder.findBridges();
69
70 BridgeFinder::BridgeIdentification bridge_to_comp;
71 bridge_to_comp.ip = getBridgeIp();
72 bridge_to_comp.port = getBridgePort();
73 bridge_to_comp.mac = getBridgeMac();
74
75 EXPECT_EQ(bridges.size(), 1) << "BridgeFinder found more than one Bridge";
76 EXPECT_EQ(bridges[0].ip, bridge_to_comp.ip) << "BridgeIdentification ip does not match";
77 EXPECT_EQ(bridges[0].port, bridge_to_comp.port) << "BridgeIdentification port does not match";
78 EXPECT_EQ(bridges[0].mac, bridge_to_comp.mac) << "BridgeIdentification mac does not match";
79
80 // Test invalid description
81 EXPECT_CALL(*handler, GETString("/description.xml", "application/xml", "", getBridgeIp(), getBridgePort()))
82 .Times(1)
83 .WillOnce(::testing::Return("invalid stuff"));
84 bridges = finder.findBridges();
85 EXPECT_TRUE(bridges.empty());
86}
87
88TEST_F(BridgeFinderTest, getBridge)
89{

Callers

nothing calls this directly

Calls 14

getBridgeIpFunction · 0.85
getBridgePortFunction · 0.85
getBridgeMacFunction · 0.85
getBridgeUsernameFunction · 0.85
BridgeFinderClass · 0.85
findBridgesMethod · 0.80
getBridgeMethod · 0.80
getBridgeIPMethod · 0.80
getBridgePortMethod · 0.80
getUsernameMethod · 0.80
addUsernameMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected