コード例 #1
0
        public void CanResolve_SameType_ShouldOk()
        {
            var simpleIoc = new SimpleIoc();

            simpleIoc.Register(() => new IocBase());
            simpleIoc.CanResolve <IocBase>().ShouldTrue();
        }
コード例 #2
0
        public void Resolve_SameTypeList_ShouldOk()
        {
            var simpleIoc = new SimpleIoc();

            simpleIoc.Register(() => new List <IocFoo>());
            simpleIoc.Resolve <List <IocFoo> >().ShouldNotNull();
            simpleIoc.Resolve <IList <IocFoo> >().ShouldNotNull();
            simpleIoc.Resolve <IEnumerable <IocFoo> >().ShouldNotNull();
        }