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); }
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)); }); }
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)); }); }
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(); }
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"))); } ); }
public PhaseController(IPhaseLogic phaseLogic) { _phaseLogic = phaseLogic; }
public PhaseController(IPhaseLogic logic) { _logic = logic; }