예제 #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>());
        }