public void InjectingAnArrayTypeSucceedsIfItWasRegistered() { IUnityContainer container = new UnityContainer(); CollectionSupportTestClass[] array = new CollectionSupportTestClass[0]; container.RegisterInstance<CollectionSupportTestClass[]>(array); CollectionSupportTestClassWithDependency resolved = container.Resolve<CollectionSupportTestClassWithDependency>(); Assert.AreSame(array, resolved.Dependency); }
public void InjectingAnArrayTypeSucceedsIfItWasRegistered() { IUnityContainer container = new UnityContainer(); CollectionSupportTestClass[] array = new CollectionSupportTestClass[0]; container.RegisterInstance <CollectionSupportTestClass[]>(array); CollectionSupportTestClassWithDependency resolved = container.Resolve <CollectionSupportTestClassWithDependency>(); Assert.AreSame(array, resolved.Dependency); }
public void Injector(CollectionSupportTestClass[] dependency) { Dependency = dependency; }
public CollectionSupportTestClassWithDependencyArrayConstructor(CollectionSupportTestClass[] dependency) { Dependency = dependency; }
public ConfigurationCollectionSupportTestClass(CollectionSupportTestClass[] arrayCtor) { ArrayCtor = arrayCtor; }
public void InjectionMethod(CollectionSupportTestClass[] arrayMethod) { ArrayMethod = arrayMethod; }