Skip to content

Commit a5a9330

Browse files
committed
- Added Servlet Json test
1 parent 7ec49d8 commit a5a9330

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Test/Case01_ActualExamples.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "JsonTestFixture.h"
88

99
#define CUSTOMERMAP_JSON "JsonExamples/CustomerMap.json"
10+
#define SERVLET_JSON "JsonExamples/Servlet.json"
1011

1112
namespace CLDEParser {
1213
namespace Test {
@@ -55,5 +56,16 @@ namespace CLDEParser {
5556
ASSERT_TRUE(verMajor == 1);
5657
ASSERT_TRUE(verMinor == 0);
5758
}
59+
60+
TEST_F(JsonTestFixture, servlet) {
61+
62+
std::ifstream file{SERVLET_JSON};
63+
ASSERT_TRUE(!file.operator!());
64+
65+
std::string document((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
66+
auto sptrJson = parserInstance().Parse(document);
67+
ASSERT_TRUE(sptrJson.operator->());
68+
ASSERT_TRUE(sptrJson->Type() == CLDEParser::Parsing::Json::JsonEntityType::Object);
69+
}
5870
}
5971
}

0 commit comments

Comments
 (0)