| 19 | }; |
| 20 | |
| 21 | TEST_F(WriterTest, insertTextSimple) |
| 22 | { |
| 23 | // Arrange |
| 24 | std::string testTextData {"Simple ASCII data"}; |
| 25 | std::string expectedResult {"<![CDATA[" + testTextData + "]]>"}; |
| 26 | |
| 27 | // Act |
| 28 | _writer.insertText(testTextData); |
| 29 | |
| 30 | // Assert |
| 31 | EXPECT_EQ(expectedResult, _writer.getString()); |
| 32 | } |
| 33 | |
| 34 | /// If the data happens to actually include an XML CDATA close marker, that needs to be "escaped" -- |
| 35 | /// this is done by breaking it up into two separate CDATA sections, splitting apart the marker. |
nothing calls this directly
no test coverage detected