Fix interface names and object paths in integration tests

This commit is contained in:
sangelovic
2019-03-24 20:18:29 +01:00
parent bb2bf5811b
commit ab407aa8c8
4 changed files with 6 additions and 11 deletions

View File

@ -314,13 +314,13 @@ TEST_F(SdbusTestObject, FailsCallingMethodOnNonexistentInterface)
TEST_F(SdbusTestObject, FailsCallingMethodOnNonexistentDestination)
{
TestingProxy proxy("wrongDestination", OBJECT_PATH);
TestingProxy proxy("sdbuscpp.destination.that.does.not.exist", OBJECT_PATH);
ASSERT_THROW(proxy.getInt(), sdbus::Error);
}
TEST_F(SdbusTestObject, FailsCallingMethodOnNonexistentObject)
{
TestingProxy proxy(INTERFACE_NAME, "/wrong/path");
TestingProxy proxy(INTERFACE_NAME, "/sdbuscpp/path/that/does/not/exist");
ASSERT_THROW(proxy.getInt(), sdbus::Error);
}
@ -363,11 +363,6 @@ TEST_F(SdbusTestObject, EmitsSignalWithoutRegistrationSuccesfully)
ASSERT_THAT(signature["platform"], Eq("av"));
}
TEST_F(SdbusTestObject, failsEmitingSignalOnNonexistentInterface)
{
ASSERT_THROW(m_adaptor->emitSignalOnNonexistentInterface(), sdbus::Error);
}
// Properties
TEST_F(SdbusTestObject, ReadsReadPropertySuccesfully)

View File

@ -60,7 +60,7 @@ TEST(Connection, CanRequestRegisteredDbusName)
TEST(Connection, CannotRequestNonregisteredDbusName)
{
auto connection = sdbus::createConnection();
ASSERT_THROW(connection->requestName("some_random_not_supported_dbus_name"), sdbus::Error);
ASSERT_THROW(connection->requestName("some.random.not.supported.dbus.name"), sdbus::Error);
}
TEST(Connection, CanReleasedRequestedName)
@ -74,7 +74,7 @@ TEST(Connection, CanReleasedRequestedName)
TEST(Connection, CannotReleaseNonrequestedName)
{
auto connection = sdbus::createConnection();
ASSERT_THROW(connection->releaseName("some_random_nonrequested_name"), sdbus::Error);
ASSERT_THROW(connection->releaseName("some.random.nonrequested.name"), sdbus::Error);
}
TEST(Connection, CanEnterAndLeaveProcessingLoop)

View File

@ -139,7 +139,7 @@ public:
void emitSignalOnNonexistentInterface()
{
object_.emitSignal("simpleSignal").onInterface("interfaceThatDoesNotExists");
object_.emitSignal("simpleSignal").onInterface("sdbuscpp.interface.that.does.not.exist");
}
private:

View File

@ -179,7 +179,7 @@ public:
int32_t callMethodOnNonexistentInterface()
{
int32_t result;
object_.callMethod("someMethod").onInterface("interfaceThatDoesNotExist").storeResultsTo(result);
object_.callMethod("someMethod").onInterface("sdbuscpp.interface.that.does.not.exist").storeResultsTo(result);
return result;
}