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

            poco.SetValue(null);
            NestingPOCO deserializedPOCO;

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

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

            poco.SetValue("Testy");
            NestingPOCO deserializedPOCO;

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

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