Ejemplo n.º 1
0
        public void Load()
        {
            var unitOfWork        = MockRepository.GenerateStub <IUnitOfWork>();
            var service           = MockRepository.GenerateStub <IPolicyService>();
            var unitOfWorkFactory = MockRepository.GenerateStub <IUnitOfWorkFactory>();

            unitOfWorkFactory.Stub(uowFact => uowFact.Create()).Return(unitOfWork);

            unitOfWork.Stub(uow => uow.Create <IPolicyService>()).Return(service);

            service.Stub(svc => svc.GetCatalogHierarchical(typeof(PlanReceiptOrder), TypeActionInSystem.NonStandardAction))
            .Return(Builder <CatalogHierarchical> .CreateNew().Build());
            var loader = new GetCatalogAccess(unitOfWorkFactory);

            loader.LoadForEntity <PlanReceiptOrder>(TypeActionInSystem.NonStandardAction);
        }
 protected override void OnLoadAcatalog()
 {
     GetCatalogAccess.LoadForEntity(typeof(CertificateQuality), TypeActionInSystem.StandardCorrection);
 }