public void CanResolve_SubType_ShouldOk() { var simpleIoc = new SimpleIoc(); simpleIoc.Register(() => new IocFoo()); simpleIoc.CanResolve <IocFoo>().ShouldTrue(); simpleIoc.CanResolve <IocBase>().ShouldTrue(); simpleIoc.CanResolve <IIocBase>().ShouldTrue(); }
public void CanResolve_SameTypeList_ShouldOk() { var simpleIoc = new SimpleIoc(); simpleIoc.Register(() => new List <IocFoo>()); simpleIoc.CanResolve <List <IocFoo> >().ShouldTrue(); simpleIoc.CanResolve <IList <IocFoo> >().ShouldTrue(); simpleIoc.CanResolve <IEnumerable <IocFoo> >().ShouldTrue(); }