Commit 36cccc13 authored by Francis Dupont's avatar Francis Dupont

[148-lib-process-servers-without-arguments] Added unit tests

parent 48845f58
......@@ -102,6 +102,18 @@ TEST_F(DaemonTest, getSetConfigFile) {
EXPECT_NO_THROW(instance.setConfigFile("test.txt"));
EXPECT_EQ("test.txt", instance.getConfigFile());
EXPECT_NO_THROW(instance.checkConfigFile());
}
// Verify config file checker.
TEST_F(DaemonTest, checkConfigFile) {
Daemon instance;
EXPECT_THROW(instance.checkConfigFile(), BadValue);
EXPECT_NO_THROW(instance.setConfigFile("/tmp/"));
EXPECT_THROW(instance.checkConfigFile(), BadValue);
EXPECT_NO_THROW(instance.setConfigFile("/tmp/test.txt"));
EXPECT_NO_THROW(instance.checkConfigFile());
}
// Verify process name accessors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment