public void ShouldForwardResolveToInnerContainer() { var myInstance = new object(); IIocContainer container = new MockMunqContainer { ResolveMethod = () => myInstance }; IServiceLocator containerAdapter = new MunqServiceLocatorAdapter(container); containerAdapter.GetInstance(typeof(object)).ShouldBeSameAs(myInstance); }
public void ShouldForwardResolveAllToInnerContainer() { IEnumerable <object> list = new List <object> { new object(), new object() }; IIocContainer container = new MockMunqContainer { ResolveAllMethod = () => list }; IServiceLocator containerAdapter = new MunqServiceLocatorAdapter(container); containerAdapter.GetAllInstances(typeof(object)).ShouldBeSameAs(list); }