示例#1
0
        public void Apply_NoProperty_Exception()
        {
            IGeneric original = new Generic1();
            IGeneric style    = new Generic2()
            {
                OneHasProperty = "test"
            };

            Assert.That(() => _propertyApplier.Apply(original, style),
                        Throws.TypeOf <ArgumentException>());
        }
示例#2
0
        public void Apply_PropertyDifferentType_Exception()
        {
            IGeneric original = new Generic1()
            {
                TypeCheck = "test"
            };
            IGeneric style = new Generic2()
            {
                TypeCheck = 2
            };

            Assert.That(() => _propertyApplier.Apply(original, style),
                        Throws.TypeOf <ArgumentException>());
        }