public void ShouldForwardResolveToInnerKernel()
        {
            var myInstance = new object();

            IKernel kernel = new MockNinjectKernel
            {
                ResolveMethod = delegate { return(new[] { myInstance }); }
            };

            IServiceLocator kernelAdapter = new NinjectServiceLocatorAdapter(kernel);

            Assert.AreSame(myInstance, kernelAdapter.GetInstance(typeof(object)));
        }
        public void ShouldForwardResolveAllToInnerKernel()
        {
            IEnumerable <object> list = new List <object> {
                new object(), new object()
            };

            IKernel kernel = new MockNinjectKernel
            {
                ResolveMethod = () => list
            };

            IServiceLocator kernelAdapter = new NinjectServiceLocatorAdapter(kernel);

            Assert.AreSame(list, kernelAdapter.GetAllInstances(typeof(object)));
        }