public static void UserRole_DefaultImplementation_ReturnsDefaultImplementation(IContainerAdapter container) { var mapper = new ContextMapper <Role>(container, new RoleProvider(Role.User)); mapper.RegisterDefault <IService, DefaultImplementation>(); var service = container.GetInstance(typeof(IService)); Assert.IsInstanceOfType(service, typeof(DefaultImplementation)); }
public TComponent Get <TComponent>() where TComponent : class { return((TComponent)_containerAdapter.GetInstance(typeof(TComponent))); }
private static MappedDependencyContextInstanceProvider <TContext> GetMappedDependencyContextInstanceProvider(IContainerAdapter container) { return((MappedDependencyContextInstanceProvider <TContext>)container.GetInstance(typeof(MappedDependencyContextInstanceProvider <TContext>))); }