Example #1
0
        public void BaseClassUnbinder()
        {
            var unbinder = new TestUnbinder();

            _target.Add(typeof(BaseClass), unbinder);
            Assert.AreSame(unbinder, _target.FindUnbinderFor(typeof(BaseClass)));
            Assert.AreSame(unbinder, _target.FindUnbinderFor(typeof(Child1)));
        }
Example #2
0
        public void UnbinderForInterface()
        {
            var unbinder = new TestUnbinder();

            _target.Add(typeof(ITest), unbinder);
            var unbinderResult = _target.FindUnbinderFor(typeof(TestImplementation));

            Assert.AreSame(unbinder, unbinderResult);
        }
Example #3
0
        public void OverridingUnbinder3_InTheOtherOrder()
        {
            var unbinder1 = new TestUnbinder();
            var unbinder2 = new TestUnbinder();

            _target.Add(typeof(Child1), unbinder2);
            _target.Add(typeof(BaseClass), unbinder1);
            Assert.AreSame(unbinder1, _target.FindUnbinderFor(typeof(BaseClass)));
            Assert.AreSame(unbinder2, _target.FindUnbinderFor(typeof(Child1)));
            Assert.AreSame(unbinder1, _target.FindUnbinderFor(typeof(Child2)));
        }