public void GetServices_UnknownService_ReturnsNull()
        {
            var container = new ServiceContainer();            

            var resolver = new LightInjectDependencyResolver(container);

            var instances = resolver.GetServices(typeof(IFoo));

            Assert.IsNull(instances); 
        }
        public void GetServices_ServiceRegisteredWithContainer_ReturnsServices()
        {
            var container = new ServiceContainer();
            container.Register<IFoo, Foo>();
            var resolver = new LightInjectDependencyResolver(container);

            var instances = resolver.GetServices(typeof(IFoo));

            Assert.AreEqual(1, instances.Count());
        }
        public void GetServices_UnknownService_ReturnsNull()
        {
            var container = new ServiceContainer();

            var resolver = new LightInjectDependencyResolver(container);

            var instances = resolver.GetServices(typeof(IFoo));

            Assert.IsNull(instances);
        }
 public void GetServices_ServiceTypeExistsInAdapterAndBase_ReturnsBothInstances()
 {
     var container = new ServiceContainer();                        
     var traceManagerMock = new Mock<ITraceManager>();
     container.RegisterInstance(traceManagerMock.Object);
     var resolver = new LightInjectDependencyResolver(container);            
     
     var instances = resolver.GetServices(typeof(ITraceManager));
     
     Assert.AreEqual(2, instances.Count());
 }
        public void GetServices_ServiceRegisteredWithContainer_ReturnsServices()
        {
            var container = new ServiceContainer();

            container.Register <IFoo, Foo>();
            var resolver = new LightInjectDependencyResolver(container);

            var instances = resolver.GetServices(typeof(IFoo));

            Assert.AreEqual(1, instances.Count());
        }
        public void GetServices_ServiceTypeExistsInAdapterAndBase_ReturnsBothInstances()
        {
            var container        = new ServiceContainer();
            var traceManagerMock = new Mock <ITraceManager>();

            container.RegisterInstance(traceManagerMock.Object);
            var resolver = new LightInjectDependencyResolver(container);

            var instances = resolver.GetServices(typeof(ITraceManager));

            Assert.AreEqual(2, instances.Count());
        }