blob: e5c718148b57a3710e1735af9a46e36f4eef6601 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#include "redfish_aggregator.hpp"
#include <gtest/gtest.h> // IWYU pragma: keep
namespace redfish
{
TEST(IsPropertyUri, SupportedPropertyReturnsTrue)
{
EXPECT_TRUE(isPropertyUri("@Redfish.ActionInfo"));
EXPECT_TRUE(isPropertyUri("@odata.id"));
EXPECT_TRUE(isPropertyUri("Image"));
EXPECT_TRUE(isPropertyUri("MetricProperty"));
EXPECT_TRUE(isPropertyUri("OriginOfCondition"));
EXPECT_TRUE(isPropertyUri("TaskMonitor"));
EXPECT_TRUE(isPropertyUri("target"));
}
TEST(IsPropertyUri, CaseInsensitiveURIReturnsTrue)
{
EXPECT_TRUE(isPropertyUri("AdditionalDataURI"));
EXPECT_TRUE(isPropertyUri("DataSourceUri"));
EXPECT_TRUE(isPropertyUri("uri"));
EXPECT_TRUE(isPropertyUri("URI"));
}
TEST(IsPropertyUri, SpeificallyIgnoredPropertyReturnsFalse)
{
EXPECT_FALSE(isPropertyUri("@odata.context"));
EXPECT_FALSE(isPropertyUri("Destination"));
EXPECT_FALSE(isPropertyUri("HostName"));
}
TEST(IsPropertyUri, UnsupportedPropertyReturnsFalse)
{
EXPECT_FALSE(isPropertyUri("Name"));
EXPECT_FALSE(isPropertyUri("Health"));
EXPECT_FALSE(isPropertyUri("Id"));
}
} // namespace redfish
|