public void MixedProperty_Exists()
        {
            var             instance = BindableDomainObjectWithMixedPersistentProperties.NewObject();
            IBusinessObject instanceAsBusinessObject = instance;
            var             boClass = instanceAsBusinessObject.BusinessObjectClass;

            Assert.That(boClass.GetPropertyDefinitions().Select(p => p.Identifier).ToArray(),
                        Has.Member("MixedProperty"));
        }
        public void MixedProperty_DefaultValue()
        {
            var             instance = BindableDomainObjectWithMixedPersistentProperties.NewObject();
            IBusinessObject instanceAsBusinessObject = instance;
            var             boClass = instanceAsBusinessObject.BusinessObjectClass;

            IBusinessObjectProperty mixedProperty = boClass.GetPropertyDefinition("MixedProperty");

            Assert.That(instanceAsBusinessObject.GetProperty(mixedProperty), Is.Null);
        }
        public void MixedProperty_NonDefaultValue_WithUnchangedValue()
        {
            var             instance = BindableDomainObjectWithMixedPersistentProperties.NewObject();
            IBusinessObject instanceAsBusinessObject = instance;
            var             boClass = instanceAsBusinessObject.BusinessObjectClass;

            IBusinessObjectProperty mixedProperty = boClass.GetPropertyDefinition("MixedProperty");
            var dateTime = ((IMixinAddingPersistentProperties)instance).MixedProperty;

            ((IMixinAddingPersistentProperties)instance).MixedProperty = dateTime;
            Assert.That(instanceAsBusinessObject.GetProperty(mixedProperty), Is.EqualTo(dateTime));
        }
        public override void SetUp()
        {
            base.SetUp();
            _classWithPropertiesInstance      = BindableDomainObjectWithProperties.NewObject();
            _classWithPropertiesMixin         = Mixin.Get <BindableDomainObjectMixin> (_classWithPropertiesInstance);
            _classWithMixedPropertiesInstance = BindableDomainObjectWithMixedPersistentProperties.NewObject();

            _classWithPropertiesMixinInstanceAsBusinessObject      = _classWithPropertiesMixin;
            _classWithPropertiesMixinInstanceAsBusinessObjectClass = _classWithPropertiesMixinInstanceAsBusinessObject.BusinessObjectClass;

            _classWithMixedPropertiesInstanceAsBusinessObject      = _classWithMixedPropertiesInstance;
            _classWithMixedPropertiesInstanceAsBusinessObjectClass = _classWithMixedPropertiesInstanceAsBusinessObject.BusinessObjectClass;
        }