Ejemplo n.º 1
0
        private StubBindableObjectClass CreateStubBindableObjectClass(PropertyBase property)
        {
            var bindableObjectClass = new StubBindableObjectClass(typeof(ClassWithAllDataTypes), _bindableObjectProvider);

            bindableObjectClass.SetProperties(new PropertyCollection(new[] { property }));
            return(bindableObjectClass);
        }
Ejemplo n.º 2
0
        public void HasPropertyDefinition_FromOverriddenPropertiesProperty()
        {
            StubBindableObjectClass bindableObjectClass = CreateStubBindableObjectClass(CreateStubProperty());

            Assert.That(bindableObjectClass.HasPropertyDefinition("Scalar"), Is.True);
            Assert.That(bindableObjectClass.HasPropertyDefinition("Invalid"), Is.False);
        }
Ejemplo n.º 3
0
        public void GetPropertyDefinitions_FromOverriddenPropertiesProperty()
        {
            var property = CreateStubProperty();
            StubBindableObjectClass bindableObjectClass = CreateStubBindableObjectClass(property);

            Assert.That(bindableObjectClass.GetPropertyDefinitions(), Is.EqualTo(new [] { property }));
        }
Ejemplo n.º 4
0
        public void GetPropertyDefinition_FromOverriddenPropertiesProperty()
        {
            var property = CreateStubProperty();
            StubBindableObjectClass bindableObjectClass = CreateStubBindableObjectClass(property);

            Assert.That(bindableObjectClass.GetPropertyDefinition("Scalar"), Is.SameAs(property));
        }
Ejemplo n.º 5
0
        public void GetPropertyDefinition_FromOverriddenPropertiesProperty_WithInvalidPropertyName()
        {
            StubBindableObjectClass bindableObjectClass = CreateStubBindableObjectClass(CreateStubProperty());

            Assert.That(bindableObjectClass.GetPropertyDefinition("Invalid"), Is.Null);
        }