private static void AssertTransitiveDependencyHasCorrectLocatorInjected(BarUsingSomething bar, IServiceLocator registeredIn, IServiceLocator resolvedFrom) { // Ninject resolves transitive dependencies from // the kernel the dependency was registered in Assert.AreSame(registeredIn, bar.Something.Locator); }
private static void AssertTransitiveDependencyHasCorrectLocatorInjected(BarUsingSomething bar, IServiceLocator registeredIn, IServiceLocator resolvedFrom) { // Unity resolves transitive dependencies from // the container the original resolve was called on Assert.AreSame(resolvedFrom, bar.Something.Locator); }