Пример #1
0
        public void NullTarget()
        {
            var binder = new MinimumOverrideGetIndexBinder(new CallInfo(0));
            var arg    = new DynamicMetaObject(Expression.Parameter(typeof(object), null), BindingRestrictions.Empty);

            AssertExtensions.Throws <ArgumentNullException>("target", () => binder.Bind(null, new[] { arg }));
        }
Пример #2
0
        public void NullArgs()
        {
            var binder = new MinimumOverrideGetIndexBinder(new CallInfo(0));
            var target = new DynamicMetaObject(Expression.Parameter(typeof(object), null), BindingRestrictions.Empty);

            Assert.Throws <ArgumentNullException>("args", () => binder.Bind(target, null));
        }
Пример #3
0
 public void NullArg()
 {
     var binder = new MinimumOverrideGetIndexBinder(new CallInfo(0));
     var target = new DynamicMetaObject(Expression.Parameter(typeof(object), null), BindingRestrictions.Empty);
     var arg = new DynamicMetaObject(Expression.Parameter(typeof(object), null), BindingRestrictions.Empty);
     Assert.Throws<ArgumentNullException>("args[1]", () => binder.Bind(target, new [] {arg, null, arg}));
 }