public virtual void Before()
 {
     service1 = (SerializationService) new SerializationServiceBuilder()
         .AddPortableFactory(TestSerializationConstants.PORTABLE_FACTORY_ID, new PortableFactoryFunc(
             i => new MorphingBasePortable())).Build();
     service2 = (SerializationService) new SerializationServiceBuilder()
         .AddPortableFactory(TestSerializationConstants.PORTABLE_FACTORY_ID,
             new PortableFactoryFunc(
                 i => new MorphingPortable())).Build();
     var data = service1.ToData(new MorphingBasePortable(unchecked(1), true, (char) 2, 3, 4, 5, 1f, 2d, "test"));
     var input = service2.CreateObjectDataInput(data);
     var portableSerializer = service2.GetPortableSerializer();
     reader = portableSerializer.CreateMorphingReader(input);
 }
        public virtual void Before()
        {
            service1 = (SerializationService) new SerializationServiceBuilder()
                       .AddPortableFactory(TestSerializationConstants.PORTABLE_FACTORY_ID, new PortableFactoryFunc(
                                               i => new MorphingBasePortable())).Build();
            service2 = (SerializationService) new SerializationServiceBuilder()
                       .AddPortableFactory(TestSerializationConstants.PORTABLE_FACTORY_ID,
                                           new PortableFactoryFunc(
                                               i => new MorphingPortable())).Build();
            var data  = service1.ToData(new MorphingBasePortable(unchecked (1), true, (char)2, 3, 4, 5, 1f, 2d, "test"));
            var input = service2.CreateObjectDataInput(data);
            var portableSerializer = service2.GetPortableSerializer();

            reader = portableSerializer.CreateMorphingReader(input);
        }