コード例 #1
0
        public void GetBinderWithOutId()
        {
            FindByIdStrategy strategy = new FindByIdStrategy();
            var memberBinder = Binder.GetMemberBinder("Find", 0);
            IDynamicBinder dynamicBinder = strategy.GetBinder(memberBinder, new object[] {});

            Assert.That(dynamicBinder, Is.Null);
        }
コード例 #2
0
        public void GetBinderForWrongMethod()
        {
            FindByIdStrategy strategy = new FindByIdStrategy();
            var memberBinder = Binder.GetMemberBinder("Delete", 1, "Id");
            IDynamicBinder dynamicBinder = strategy.GetBinder(memberBinder, new object[] { 100 });

            Assert.That(dynamicBinder, Is.Null);
        }