This forum is not used anymore. Please ask new questions to Stack Overflow: https://stackoverflow.com/questions/tag ... ort=newest (use aspnetboilerplate tag).
By place222
#5873 this is my Code

Code: Select all            var b = Substitute.For<IB>();

            LocalIocManager.IocContainer.Register(Component.For<IB>().UsingFactoryMethod(() => b).LifestyleSingleton());

            var a = Resolve<IA>();


    public interface IA : IApplicationService    {}

    public interface IB : IApplicationService    { }

public class B : IB
{
public B()
{

}
}

Code: Select all     public class TestA : IA
    {
        private readonly IB _b;

        public TestA(IB b)
        {
            _b = b;
        }
    }


when i imp Ib interface i got the object is not then Stub obj, any thing wrong?