Пример #1
0
 public void Setup()
 {
     _unityContainer = new UnityContainer();
     _testDtoFactory = new TestDtoFactory();
     _unityContainer.RegisterType <InteractionRequestView>();                  _unityContainer.RegisterType <InteractionRequestViewModel>();
     _unityContainer.RegisterType <RequestController>();
 }
Пример #2
0
        public void Setup()
        {
            _unityContainer = new UnityContainer();
            _testDtoFactory = new TestDtoFactory();
            _helperDataServices.Setup(x => x.GetMappedAllAsyncHelper <ProvinceViewObject, DataAccessLayer.DataObjects.PROVINCIA>()).ReturnsAsync(_provinciasDto);
            _dataServicesMock.Setup(x => x.GetHelperDataServices()).Returns(_helperDataServices.Object);
            object[] param = new object[1];
            param[0] = _unityContainer;
            InjectionConstructor injectContainer = new InjectionConstructor(param);

            _unityContainer.RegisterInstance <IDataServices>(_dataServicesMock.Object);
            _unityContainer.RegisterType <IInteractionRequestController, RequestController>(new ContainerControlledLifetimeManager(), injectContainer);
        }