Esempio n. 1
0
        public void AttachProperties_PropertyCollectionWithMishmatchingSchemaTypes_ThrowsArgumentException()
        {
            var prophandler = DummyFactory.GetPropertyHandler();

            var propertyList       = DummyFactory.GetPropertyList(12);
            var schema             = DummyFactory.GetSchema <int>("property", 12);
            var attachedProperties = new PropertyCollection(propertyList, schema);

            Assert.Throws <ArgumentException>(() => prophandler.AttachProperties(attachedProperties));
        }
Esempio n. 2
0
        public void AttachProperties_PropertyCollectionWithMishmatchingContext_ThrowsArgumentException()
        {
            var prophandler = DummyFactory.GetPropertyHandler();

            var propertyList = DummyFactory.GetPropertyList(12);

            propertyList.Add(new Property <string>("property13", new Context("othercontext"), CultureInfo.InvariantCulture));
            var schema             = DummyFactory.GetSchema <int>("property", 13);
            var attachedProperties = new PropertyCollection(propertyList, schema);

            Assert.Throws <ArgumentException>(() => prophandler.AttachProperties(attachedProperties));
        }