1 #include "src/processing.hpp"
2 
3 #include <gtest/gtest.h>
4 
5 // Verify if name is empty, false is returned
6 TEST(NeedToIntrospect, PassEmptyName)
7 {
8     std::string processName;
9 
10     EXPECT_FALSE(needToIntrospect(processName));
11 }
12 
13 // Verify if name is org, true is returned
14 TEST(NeedToIntrospect, NameOrg)
15 {
16     std::string processName = "org";
17 
18     EXPECT_TRUE(needToIntrospect(processName));
19 }
20 
21 // Verify if name is org.freedesktop, false is returned
22 TEST(NeedToIntrospect, NameOrgFreedesktop)
23 {
24     std::string processName = "org.freedesktop";
25 
26     EXPECT_FALSE(needToIntrospect(processName));
27 }
28 
29 // Verify if name is org.freedesktop.foo, false is returned
30 TEST(NeedToIntrospect, nameOrgFreeDesktopFoo)
31 {
32     std::string processName = "org.freedesktop.foo";
33 
34     EXPECT_FALSE(needToIntrospect(processName));
35 }
36 
37 // Verify if name is org.openbmc, true is returned
38 TEST(NeedToIntrospect, nameOrgOpenBMC)
39 {
40     std::string processName = "org.openbmc";
41 
42     EXPECT_TRUE(needToIntrospect(processName));
43 }
44 
45 // Verify if name is a colon, false is returned
46 TEST(NeedToIntrospect, NameColon)
47 {
48     std::string processName = ":";
49 
50     EXPECT_FALSE(needToIntrospect(processName));
51 }
52 
53 // Verify if name is a unique name, false is returned
54 TEST(NeedToIntrospect, NameUnique)
55 {
56     std::string processName = ":1.32";
57 
58     EXPECT_FALSE(needToIntrospect(processName));
59 }
60