Example #1
0
        public PhaseLogicTests()
        {
            _phaseDtoRepository       = new Mock <IRepository <PhaseDTO> >();
            _studyDtoRepository       = new Mock <IRepository <StudyDTO> >();
            _taskDtoRepository        = new Mock <IRepository <ReviewTaskDTO> >();
            _taskDelegationRepository = new Mock <IRepository <TaskDelegationDTO> >();

            _phaseLogic = new PhaseLogic(_phaseDtoRepository.Object, _studyDtoRepository.Object, _taskDelegationRepository.Object, _taskDtoRepository.Object);
        }
Example #2
0
 public EngagementType(IStudentLogic studentLogic, IPhaseLogic phaseLogic)
 {
     Field(x => x.ProjectID);
     Field(x => x.StudentID);
     Field(x => x.DocumentID);
     Field(x => x.Description);
     Field(x => x.Name);
     Field(x => x.PhaseID);
     FieldAsync <StudentType>("student", resolve: async context => { return(await studentLogic.GetById(context.Source.StudentID)); });
     FieldAsync <PhaseType>("phase", resolve: async context => { return(await phaseLogic.GetById(context.Source.PhaseID)); });
 }
Example #3
0
 public ProjectPlanType(IPhaseLogic phaseLogic)
 {
     Field(x => x.ProjectID);
     Field(x => x.DocumentID);
     Field(x => x.Title);
     Field(x => x.Note);
     Field(x => x.EstimatedStartDate);
     Field(x => x.Duration);
     Field(x => x.DateOfCompilation);
     //Field<EmployeeType>("employee", resolve: context => { return employeeLogic.GetByID(context.Source.ComposedBy.EmployeeID); }); //IZMENI, nema objekat composed by
     FieldAsync <ListGraphType <PhaseType> >("phases", resolve: async context => { return(await phaseLogic.GetByProjectPlan(context.Source.DocumentID)); });
 }
Example #4
0
        public PhaseLogicIntegrationTests()
        {
            var efContext = new EFContext();

            _phaseDtoRepository       = new PhaseRepository(efContext);
            _studyDtoRepository       = new StudyRepository(efContext);
            _taskDtoRepository        = new TaskRepository(efContext);
            _taskDelegationRepository = new TaskDelegationRepository(efContext);

            _phaseLogic = new PhaseLogic(_phaseDtoRepository, _studyDtoRepository, _taskDelegationRepository, _taskDtoRepository);
            efContext.PurgeData();
        }
Example #5
0
 public PhaseQuery(IPhaseLogic phaseLogic)
 {
     FieldAsync <PhaseType>(
         "phasetById",
         arguments: new QueryArguments(new QueryArgument <IntGraphType>
     {
         Name = "id"
     }),
         resolve: async context => { return(await phaseLogic.GetById(context.GetArgument <int>("id"))); }
         );
     FieldAsync <ListGraphType <PhaseType> >(
         "phasesByProjectPlan",
         arguments: new QueryArguments(new QueryArgument <LongGraphType>
     {
         Name = "projectPlanId"
     }),
         resolve: async context => { return(await phaseLogic.GetByProjectPlan(context.GetArgument <long>("projectPlanId"))); }
         );
 }
Example #6
0
 public PhaseController(IPhaseLogic phaseLogic)
 {
     _phaseLogic = phaseLogic;
 }
 public PhaseController(IPhaseLogic logic)
 {
     _logic = logic;
 }