Пример #1
0
 public ScheduleService(
     ITreatmentWayRepository repoTreatmentWay,
     ICommentRepository repoComment,
     IScheduleUpdateRepository repoScheduleUpdate,
     ISchedulePartRepository repoSchedulePart,
     IPartRepository repoPart,
     IInkObjectRepository repoObject,
     IScheduleRepository repoSchedule,
     IChemicalRepository repoChemical,
     IProcessRepository repoProcess,
     ISupplierRepository repoSup,
     IInkRepository repoInk,
     IMapper mapper,
     MapperConfiguration configMapper)
 {
     _repoTreatmentWay   = repoTreatmentWay;
     _repoScheduleUpdate = repoScheduleUpdate;
     _configMapper       = configMapper;
     _mapper             = mapper;
     _repoSchedulePart   = repoSchedulePart;
     _repoInk            = repoInk;
     _repoSup            = repoSup;
     _repoProcess        = repoProcess;
     _repoChemical       = repoChemical;
     _repoSchedule       = repoSchedule;
     _repoObject         = repoObject;
     _repoPart           = repoPart;
     _repoComment        = repoComment;
 }
        public void TestFixtureSetup()
        {
            _fakeRepository  = Substitute.For <IChemicalRepository>();
            _fakeUnitOfWork  = Substitute.For <IUnitOfWork>();
            _chemicalService = new ChemicalService(_fakeRepository, _fakeUnitOfWork);

            Mapper.CreateMap <ChemicalDTO, Chemical>();
            Mapper.CreateMap <Chemical, ChemicalDTO>();
        }
Пример #3
0
 public PartService(IChemicalRepository repoChemical, IInkRepository repoInk, IScheduleRepository repoSchedule, IPartRepository repoPart, IMapper mapper, MapperConfiguration configMapper)
 {
     _configMapper = configMapper;
     _mapper       = mapper;
     _repoPart     = repoPart;
     _repoSchedule = repoSchedule;
     _repoInk      = repoInk;
     _repoChemical = repoChemical;
 }
Пример #4
0
 public ChemicalService(IChemicalRepository repoChemical, IProcessRepository repoProcess, ISupplierRepository repoSup, IInkRepository repoInk, IMapper mapper, MapperConfiguration configMapper)
 {
     _configMapper = configMapper;
     _mapper       = mapper;
     _repoInk      = repoInk;
     _repoSup      = repoSup;
     _repoProcess  = repoProcess;
     _repoChemical = repoChemical;
 }
Пример #5
0
 public GluesService(ITreatmentWayRepository repoTreatmentWay, IPartInkChemicalRepository repoPartInkChemical, IGluesRepository repoGlues, IChemicalRepository repoChemical, IInkRepository repoInk, IScheduleRepository repoSchedule, IPartRepository repoPart, IMapper mapper, MapperConfiguration configMapper)
 {
     _configMapper        = configMapper;
     _mapper              = mapper;
     _repoPart            = repoPart;
     _repoTreatmentWay    = repoTreatmentWay;
     _repoSchedule        = repoSchedule;
     _repoPartInkChemical = repoPartInkChemical;
     _repoInk             = repoInk;
     _repoChemical        = repoChemical;
     _repoGlues           = repoGlues;
 }
 public void SetUp()
 {
     this.fakeChemicalRepository = Substitute.For <IChemicalRepository>();
     this.fakeUnitOfWork         = Substitute.For <IUnitOfWork>();
     this.chemicalService        = new ChemicalService(this.fakeChemicalRepository, this.fakeUnitOfWork);
     this.chemicals = new List <Chemical>
     {
         { new Chemical {
               Id = 1, Name = "First"
           } },
         { new Chemical {
               Id = 2, Name = "Second"
           } },
         { new Chemical {
               Id = 3, Name = "Third"
           } }
     };
 }
 public void Setup()
 {
     _fakeRepository  = Substitute.For <IChemicalRepository>();
     _fakeUnitOfWork  = Substitute.For <IUnitOfWork>();
     _chemicalService = new ChemicalService(_fakeRepository, _fakeUnitOfWork);
 }
Пример #8
0
 public ChemicalService(IChemicalRepository repository, IUnitOfWork unitOfWork)
 {
     this.repository = repository;
     this.unitOfWork = unitOfWork;
 }
 public void SetUp()
 {
     this.fakeChemicalRepository = Substitute.For <IChemicalRepository>();
     this.fakeUnitOfWork         = Substitute.For <IUnitOfWork>();
     this.chemicalService        = new ChemicalService(this.fakeChemicalRepository, this.fakeUnitOfWork);
 }