|
@@ -3,7 +3,7 @@
|
|
|
* Company: Lynar Studios
|
|
|
* E-Mail: webmaster@lynarstudios.com
|
|
|
* Created: 2023-02-10
|
|
|
-* Changed: 2023-02-12
|
|
|
+* Changed: 2023-02-13
|
|
|
*
|
|
|
* */
|
|
|
|
|
@@ -121,7 +121,6 @@ namespace
|
|
|
TEST_F(SectionPairRowListValueTest, marshal)
|
|
|
{
|
|
|
shared_ptr<SectionPairRowListValue> value = make_shared<SectionPairRowListValue>();
|
|
|
- value->setSerializable(make_shared<SerializableSectionPairRowListValue>(value));
|
|
|
value->add("Drumming");
|
|
|
value->add("Reading");
|
|
|
value->add("Coding");
|
|
@@ -131,46 +130,9 @@ namespace
|
|
|
ASSERT_STREQ(expected.c_str(), value->marshal().c_str());
|
|
|
}
|
|
|
|
|
|
- TEST_F(SectionPairRowListValueTest, marshal_no_serializable)
|
|
|
- {
|
|
|
- SectionPairRowListValue list{};
|
|
|
-
|
|
|
- EXPECT_THROW(
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- byte_field data = list.marshal();
|
|
|
- }
|
|
|
- catch (const NullPointerException &_exception)
|
|
|
- {
|
|
|
- throw;
|
|
|
- }
|
|
|
- },
|
|
|
- NullPointerException);
|
|
|
- }
|
|
|
-
|
|
|
- TEST_F(SectionPairRowListValueTest, setSerializable_no_reference)
|
|
|
- {
|
|
|
- SectionPairRowListValue list{};
|
|
|
-
|
|
|
- EXPECT_THROW(
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- list.setSerializable(nullptr);
|
|
|
- }
|
|
|
- catch (const IllegalArgumentException &_exception)
|
|
|
- {
|
|
|
- throw;
|
|
|
- }
|
|
|
- },
|
|
|
- IllegalArgumentException);
|
|
|
- }
|
|
|
-
|
|
|
TEST_F(SectionPairRowListValueTest, unmarshal)
|
|
|
{
|
|
|
shared_ptr<SectionPairRowListValue> value = make_shared<SectionPairRowListValue>();
|
|
|
- value->setSerializable(make_shared<SerializableSectionPairRowListValue>(value));
|
|
|
::std::string serializedListValue = " Drumming" + NewLine::get() + " Reading" + NewLine::get() + " Coding" + NewLine::get();
|
|
|
value->unmarshal(serializedListValue);
|
|
|
|
|
@@ -179,22 +141,4 @@ namespace
|
|
|
ASSERT_STREQ("Reading", value->get(1).c_str());
|
|
|
ASSERT_STREQ("Coding", value->get(2).c_str());
|
|
|
}
|
|
|
-
|
|
|
- TEST_F(SectionPairRowListValueTest, unmarshal_no_serializable)
|
|
|
- {
|
|
|
- SectionPairRowListValue list{};
|
|
|
-
|
|
|
- EXPECT_THROW(
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- list.unmarshal(" Blue\nYellow\n");
|
|
|
- }
|
|
|
- catch (const NullPointerException &_exception)
|
|
|
- {
|
|
|
- throw;
|
|
|
- }
|
|
|
- },
|
|
|
- NullPointerException);
|
|
|
- }
|
|
|
}
|