internal void GetAllInstances_EnumerableBySecondLevelInterface_ExpectedInstancesTypes() { var result = NewContainer.GetAllInstances <IFoo>().ToList(); Assert.Contains(typeof(Foo1), result.Select(x => x.GetType())); Assert.Contains(typeof(Foo2), result.Select(x => x.GetType())); Assert.Contains(typeof(Foo3), result.Select(x => x.GetType())); Assert.Contains(typeof(Foo4), result.Select(x => x.GetType())); Assert.Contains(typeof(Foo5), result.Select(x => x.GetType())); }
internal void GetInstance_EnumerableByClassTypeMarkedClass_NotEmptyCollection() { var result = NewContainer.GetAllInstances <BarForAttribute>(); Assert.NotEmpty(result); }
internal void GetAllInstances_EnumerableBySecondLevelInterface_NotEmpty() { var result = NewContainer.GetAllInstances <IFoo>(); Assert.NotEmpty(result); }
internal void GetInstance_ByEnumerableForGenericClass_ExpectedCount() { var result = NewContainer.GetAllInstances <GenericServiceClass <BarForGeneric> >().Count(); Assert.Equal(2, result); }