Exemplo n.º 1
0
        public void ArgumentPassed()
        {
            var target = new DynamicMetaObject(Expression.Parameter(typeof(object), null), BindingRestrictions.Empty);
            var arg    = new DynamicMetaObject(Expression.Parameter(typeof(object), null), BindingRestrictions.Empty);
            var binder = new MinimumOverrideUnaryOperationBinder(ExpressionType.Negate);

            Assert.Throws <ArgumentException>("args", () => binder.Bind(target, new[] { arg }));
        }
Exemplo n.º 2
0
 public void ArgumentPassed()
 {
     var target = new DynamicMetaObject(Expression.Parameter(typeof(object), null), BindingRestrictions.Empty);
     var arg = new DynamicMetaObject(Expression.Parameter(typeof(object), null), BindingRestrictions.Empty);
     var binder = new MinimumOverrideUnaryOperationBinder(ExpressionType.Negate);
     Assert.Throws<ArgumentException>("args", () => binder.Bind(target, new[] {arg}));
 }
Exemplo n.º 3
0
        public void NullTarget()
        {
            var binder = new MinimumOverrideUnaryOperationBinder(ExpressionType.Negate);

            Assert.Throws <ArgumentNullException>("target", () => binder.Bind(null, null));
        }
Exemplo n.º 4
0
 public void NullTarget()
 {
     var binder = new MinimumOverrideUnaryOperationBinder(ExpressionType.Negate);
     Assert.Throws<ArgumentNullException>("target", () => binder.Bind(null, null));
 }