public static void ClassInit(TestContext context)
        {
            var container = new UnityContainer();

            DomainUnityContainer.BuildUp(container);
            InfrastructureUnityContainer.BuildUp(container);
            UserAppService = container.Resolve <IUserManagementApplicationService>();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Registers the type mappings with the Unity container.
        /// </summary>
        /// <param name="container">The unity container to configure.</param>
        /// <remarks>
        /// There is no need to register concrete types such as controllers or
        /// API controllers (unless you want to change the defaults), as Unity
        /// allows resolving a concrete type even if it was not previously
        /// registered.
        /// </remarks>
        public static void RegisterTypes(IUnityContainer container)
        {
            CoreUnityContainer.BuildUp(container);
            DomainUnityContainer.BuildUp(container);
            InfrastructureUnityContainer.BuildUp(container);

            //container.RegisterType<IControllerFactory, DefaultControllerFactory>();
            //container.RegisterType<IControllerActivator, MVCControllerActivator>();
        }
Exemplo n.º 3
0
        public static void ClassInit(TestContext context)
        {
            typeof(InfrastructureUnityContainer)
            .GetField("UnityContainer", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static)
            .SetValue(null, null);
            typeof(DomainUnityContainer)
            .GetField("UnityContainer", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static)
            .SetValue(null, null);

            var container = new UnityContainer();

            DomainUnityContainer.BuildUp(container);
            InfrastructureUnityContainer.BuildUp(container);
            UserRepo = container.Resolve <IUserManagementRepository>();
        }
 /// <summary>
 /// Registers the type mappings with the Unity container.
 /// </summary>
 /// <param name="container">The unity container to configure.</param>
 /// <remarks>
 /// There is no need to register concrete types such as controllers or
 /// API controllers (unless you want to change the defaults), as Unity
 /// allows resolving a concrete type even if it was not previously
 /// registered.
 /// </remarks>
 public static void RegisterTypes(IUnityContainer container)
 {
     CoreUnityContainer.BuildUp(container);
     DomainUnityContainer.BuildUp(container);
     InfrastructureUnityContainer.BuildUp(container);
 }