예제 #1
0
        public void TestMethod_Update_NullEntity_Throws()
        {
            ICollaborationService service = _unityContainer.Resolve <ICollaborationService>();
            Action act = () => service.Update(null);

            AssertExtension.AssertInnerThrows <NullReferenceException>(act, "Nessuna eccezione di ritorno. Era attesa una NullReferenceException");
        }
 public UDSCollaborationService(IDataUnitOfWork unitOfWork, ILogger logger, IValidatorService validatorService,
                                IUDSRuleset udsRuleset, IMapperUnitOfWork mapperUnitOfWork, ISecurity security, ICollaborationService collaborationService)
     : base(unitOfWork, logger, validatorService, udsRuleset, mapperUnitOfWork, security)
 {
     _unitOfWork           = unitOfWork;
     _collaborationService = collaborationService;
 }
예제 #3
0
 public TaskRelationController(
     ITaskRelationService relationService,
     ICollaborationService collaborationService
     )
 {
     _relationService      = relationService;
     _collaborationService = collaborationService;
 }
예제 #4
0
        protected virtual async Task InitClient()
        {
            UserLog = UserHelper.GetCurrentUser(HttpContext);
            Client  = new StudioClient(Config, UserLog, Log.Logger);
            var token = await HttpContext.GetTokenAsync("access_token");

            Client.SetAuthHeader(token);
            CollaborationService = new ProjectsCollabService(Client, Config.ApiResultPageSize);
        }
예제 #5
0
 public ContentGroupController(
     IContentGroupService groupService,
     IUserService userService,
     ICollaborationService collaborationService
     )
 {
     _groupService         = groupService;
     _userService          = userService;
     _collaborationService = collaborationService;
 }
 public NoteController(
     INoteService noteService,
     ICollaborationService collaborationService,
     IUserService userService,
     IUserNotifier userNotifier
     ) : base(userNotifier)
 {
     _noteService          = noteService;
     _collaborationService = collaborationService;
     _userService          = userService;
 }
예제 #7
0
 public TodoController(
     ITodoService todoService,
     ICollaborationService collaborationService,
     IUserService userService,
     IUserNotifier userNotifier
     ) : base(userNotifier)
 {
     _todoService          = todoService;
     _collaborationService = collaborationService;
     _userService          = userService;
 }
 public CollaborationController(
     ICollaborationService collaborationService,
     IContentGroupService groupService,
     IAccountService accountService,
     IUserService userService,
     IUserNotifier userNotifier
     ) : base(userNotifier)
 {
     _collaborationService = collaborationService;
     _groupService         = groupService;
     _accountService       = accountService;
     _userService          = userService;
 }
예제 #9
0
        public FakeProjectsController GetTestController(ICollaborationService mockSvc)
        {
            var httpCtx = new Mock <HttpContext>();

            httpCtx.Setup(s => s.TraceIdentifier).Returns(TestTraceID);
            return(new FakeProjectsController(DataGenerator.GetStudioAppConfig(), mockSvc)
            {
                ControllerContext = new ControllerContext()
                {
                    HttpContext = httpCtx.Object
                }
            });
        }
예제 #10
0
        public async Task TestMethod_Insert_NotThrows()
        {
            ICollaborationService service    = _unityContainer.Resolve <ICollaborationService>();
            IDataUnitOfWork       unitOfWork = _unityContainer.Resolve <IDataUnitOfWork>();

            Collaboration collaboration = CustomElements.CreateCollaborationModel();

            collaboration = service.Create(collaboration);
            await unitOfWork.SaveChangesAsync();

            Collaboration collaborationSaved = service.Queryable().FirstOrDefault(f => f.EntityId == CustomElements.CollaborationId);

            Assert.IsNotNull(collaborationSaved);
        }
예제 #11
0
 public WorkflowStartService(ILogger logger, IWorkflowInstanceService workflowInstanceService, IWorkflowArgumentMapper workflowArgumentMapper,
                             IWorkflowInstanceRoleService workflowInstanceRoleService, IWorkflowActivityService workflowActivityService,
                             ITopicService topicServiceBus, ICQRSMessageMapper mapper_eventServiceBusMessage,
                             IDataUnitOfWork unitOfWork, StorageDocument.IDocumentContext <ModelDocument.Document, ModelDocument.ArchiveDocument> documentService,
                             ICollaborationService collaborationService, ISecurity security, IParameterEnvService parameterEnvService, IFascicleRoleService fascicleRoleService,
                             IMessageService messageService, IDossierRoleService dossierRoleService, IQueueService queueService, IWordOpenXmlDocumentGenerator wordOpenXmlDocumentGenerator,
                             IMessageConfiguration messageConfiguration, IProtocolLogService protocolLogService, IPDFDocumentGenerator pdfDocumentGenerator,
                             IFascicleService fascicleService, IFascicleDocumentService fascicleDocumentService, IFascicleFolderService fascicleFolderService,
                             IFascicleDocumentUnitService fascDocumentUnitService, IFascicleLinkService fascicleLinkService)
     : base(logger, workflowInstanceService, workflowInstanceRoleService, workflowActivityService, topicServiceBus, mapper_eventServiceBusMessage,
            unitOfWork, documentService, collaborationService, security, parameterEnvService, fascicleRoleService, messageService, dossierRoleService, queueService,
            wordOpenXmlDocumentGenerator, messageConfiguration, protocolLogService, pdfDocumentGenerator, fascicleService, fascicleDocumentService, fascicleFolderService,
            fascDocumentUnitService, fascicleLinkService)
 {
     _unitOfWork = unitOfWork;
     _workflowInstanceService = workflowInstanceService;
     _workflowArgumentMapper  = workflowArgumentMapper;
     _documentService         = documentService;
 }
예제 #12
0
        public async Task TestMethod_Update_NotThrows()
        {
            ICollaborationService service    = _unityContainer.Resolve <ICollaborationService>();
            IDataUnitOfWork       unitOfWork = _unityContainer.Resolve <IDataUnitOfWork>();

            Collaboration collaboration = CustomElements.CreateCollaborationModel();

            collaboration = service.Create(collaboration);
            await unitOfWork.SaveChangesAsync();

            Collaboration collaborationToUpdate = service.Queryable().FirstOrDefault(f => f.EntityId == CustomElements.CollaborationId);

            collaborationToUpdate.Note = "Unit Test - Modifica";
            service.Update(collaborationToUpdate);
            await unitOfWork.SaveChangesAsync();

            Collaboration collaborationModified = service.Queryable().FirstOrDefault(f => f.EntityId == CustomElements.CollaborationId);

            Assert.IsNotNull(collaborationModified);
            Assert.AreEqual("Unit Test - Modifica", collaborationModified.Note);
        }
 public PostUpdateIntegrationEventHandler(ICollaborationService collaborationService, IThreadRepository threadRepository, IPostRepository postRepository)
 {
     _collaborationService = collaborationService;
 }
 public ThreadUpdateIntegrationEventHandler(ICollaborationService collaborationService)
 {
     _collaborationService = collaborationService;
 }
예제 #15
0
 public CollaborationsController(ICollaborationService collaborationService, ICollaborationRepository collaborationRepository, IMapper mapper)
 {
     _collaborationService    = collaborationService;
     _collaborationRepository = collaborationRepository;
     _mapper = mapper;
 }
예제 #16
0
 public FakeProjectsController(StudioApplicationConfig config, ICollaborationService svc) : base(config)
 {
     MockService   = svc;
     IsInitialized = false;
 }