public void SerializationServiceDeSerializeStringDeSerializesUsingTypeNameToObjectTest()
 {
     var serializationService = new JsonSerializationService();
     var testObject = new SerializationTestClass("Bob", DateTime.Now);
     var serializedObject = serializationService.SerializeFormData(testObject);
     var deserializedObject = serializationService.DeSerializeFormData(serializedObject);
     Assert.IsInstanceOfType(deserializedObject, typeof (SerializationTestClass));
 }
Esempio n. 2
0
        public void SerializationServiceDeSerializeStringDeSerializesUsingTypeNameToObjectTest()
        {
            var serializationService = new JsonSerializationService();
            var testObject           = new SerializationTestClass("Bob", DateTime.Now);
            var serializedObject     = serializationService.SerializeFormData(testObject);
            var deserializedObject   = serializationService.DeSerializeFormData(serializedObject);

            Assert.IsInstanceOfType(deserializedObject, typeof(SerializationTestClass));
        }