public void Apply_NoProperty_Exception() { IGeneric original = new Generic1(); IGeneric style = new Generic2() { OneHasProperty = "test" }; Assert.That(() => _propertyApplier.Apply(original, style), Throws.TypeOf <ArgumentException>()); }
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>()); }