public void GetServices_WithTypeParameter_IfTheTypeIsConcreteWithParameterlessConstructorAndIfTheTypeIsRegistered_ShouldReturnACollectionWithAnInstanceOfThatType() { TestHelper.ClearStructureMap(); TestHelper.AssertStructureMapIsCleared(); ObjectFactory.Initialize(initializer => initializer.For<SomeConcreteClassWithParameterlessConstructor>().Use<SomeConcreteClassWithParameterlessConstructor>()); var instances = new ServiceLocator(ObjectFactory.Container).GetServices(typeof(SomeConcreteClassWithParameterlessConstructor)).ToArray(); Assert.IsNotNull(instances); Assert.IsTrue(instances.Count() == 1); Assert.IsTrue(instances.ElementAt(0) is SomeConcreteClassWithParameterlessConstructor); }