예제 #1
0
        public void SerializeThenDeserialize_NestingPOCO2WithNullValue_HasNullValue()
        {
            // Arrange
            string       actual;
            NestingPOCO2 poco = new NestingPOCO2();

            poco.SetValue(null);
            NestingPOCO2 deserializedPOCO;

            // Act
            deserializedPOCO = SerializeThenDeserialiseNestingPOCO2(poco);
            actual           = deserializedPOCO.GetValue();

            // Assert
            Assert.IsNull(actual);
        }
예제 #2
0
        public void SerializeThenDeserialize_NestingPOCO2WithValueOfTesty2_HasValueOfTesty2()
        {
            // Arrange
            string       actual;
            string       expected = "Testy2";
            NestingPOCO2 poco     = new NestingPOCO2();

            poco.SetValue("Testy2");
            NestingPOCO2 deserializedPOCO;

            // Act
            deserializedPOCO = SerializeThenDeserialiseNestingPOCO2(poco);
            actual           = deserializedPOCO.GetValue();

            // Assert
            Assert.AreEqual(expected, actual);
        }