public void Create()
        {
            var wrapper        = new ClassDerivedFromBindableObjectBase();
            var implementation = BindableObjectBaseImplementation.Create(wrapper);

            Assert.That(implementation.BusinessObjectClass, Is.Not.Null);
            Assert.That(PrivateInvoke.GetNonPublicProperty(implementation, "Target"), Is.SameAs(wrapper));
        }
        public void Deserialization()
        {
            var wrapper          = new ClassDerivedFromBindableObjectBase();
            var implementation   = BindableObjectBaseImplementation.Create(wrapper);
            var deserializedData = Serializer.SerializeAndDeserialize(Tuple.Create(implementation, wrapper));

            Assert.That(deserializedData.Item1.BusinessObjectClass, Is.Not.Null);
            Assert.That(PrivateInvoke.GetNonPublicProperty(deserializedData.Item1, "Target"), Is.SameAs(deserializedData.Item2));
        }
Esempio n. 3
0
 protected BindableObjectBase()
 {
     Assertion.DebugAssert(!TypeExtensions.CanAscribeTo(typeof(BindableObjectMixin), typeof(Mixin <,>)),
                           "we assume the mixin does not have a base object");
     _implementation = BindableObjectBaseImplementation.Create(this);
 }