public void IEnumerableInConstructor()
{
Configuration configuration = new Configuration();
configuration.Register(typeof(ICommon), typeof(First), Lifetime.Singleton, "First");
configuration.Register(typeof(ICommon), typeof(Second), Lifetime.Singleton, "Second");
configuration.Register(typeof(ICommonFrameEnumerable), typeof(CommonFrameEnumerable));
DependencyInjector injector = new DependencyInjector(configuration);
IEnumerable <ICommon> objects = injector.Resolve <IEnumerable <ICommon> >();
List <ICommon> objectsList = new List <ICommon>();
foreach (var obj in objects)
{
objectsList.Add(obj);
}
ICommonFrameEnumerable objectFrame = injector.Resolve <ICommonFrameEnumerable>();
IEnumerable <ICommon> protoCheckList = objectFrame.All;
List <ICommon> checkList = new List <ICommon>();
foreach (var obj in protoCheckList)
{
checkList.Add(obj);
}
CollectionAssert.AreEquivalent(objectsList, checkList);
}