public void Setup()
        {
            hazardousSubstanceRepository = new Mock<IHazardousSubstancesRepository>();
            userRepository = new Mock<IUserForAuditingRepository>();
            log = new Mock<IPeninsulaLog>();
            hazardousSubstanceRiskAssessmentRepository = new Mock<IHazardousSubstanceRiskAssessmentRepository>();

            target = new HazardousSubstancesService(
                hazardousSubstanceRepository.Object, 
                userRepository.Object, 
                null,
                null,
                null,
                null, 
                hazardousSubstanceRiskAssessmentRepository.Object, log.Object);
        }
        public void Setup()
        {
            hazardousSubstanceRepository = new Mock<IHazardousSubstancesRepository>();
            supplierRepository = new Mock<ISupplierRepository>();
            userRepository = new Mock<IUserForAuditingRepository>();
            pictogramRepository = new Mock<IPictogramRepository>();
            riskPhraseRepository = new Mock<IRiskPhraseRepository>();
            safetyPhraseRepository = new Mock<ISafetyPhraseRepository>();
            log = new Mock<IPeninsulaLog>();

            target = new HazardousSubstancesService(
                hazardousSubstanceRepository.Object,
                userRepository.Object,
                supplierRepository.Object,
                pictogramRepository.Object,
                riskPhraseRepository.Object,
                safetyPhraseRepository.Object, null, log.Object);
        }
Beispiel #3
0
        public void Setup()
        {
            hazardousSubstanceRepository = new Mock<IHazardousSubstancesRepository>();
            hazardousSubstanceRepository.Setup(x => x.SaveOrUpdate(It.IsAny<HazardousSubstance>()));
            userRepository = new Mock<IUserForAuditingRepository>();
            userRepository.Setup(x => x.GetByIdAndCompanyId(It.IsAny<Guid>(), It.IsAny<long>())).Returns(new UserForAuditing());
            supplierRepository = new Mock<ISupplierRepository>();
            pictogramRepository = new Mock<IPictogramRepository>();
            riskPhraseRepository = new Mock<IRiskPhraseRepository>();
            safetyPhraseRepository = new Mock<ISafetyPhraseRepository>();
            log = new Mock<IPeninsulaLog>();
            log.Setup(x => x.Add(It.IsAny<Exception>()));
            log.Setup(x => x.Add(It.IsAny<object>()));

            target = new HazardousSubstancesService(
                hazardousSubstanceRepository.Object, 
                userRepository.Object,
                supplierRepository.Object,
                pictogramRepository.Object,
                riskPhraseRepository.Object, 
                safetyPhraseRepository.Object, null, log.Object);
        }
        public void Setup()
        {
            repository = new Mock<IHazardousSubstancesRepository>();
            repository.Setup(x => x.GetForCompany(It.IsAny<long>())).Returns(new List<HazardousSubstance>());

            userRepository = new Mock<IUserForAuditingRepository>();
            userRepository.Setup(x => x.GetByIdAndCompanyId(It.IsAny<Guid>(), It.IsAny<long>())).Returns(new UserForAuditing());

            pictogramRepository = new Mock<IPictogramRepository>();
            riskPhraseRepository = new Mock<IRiskPhraseRepository>();
            safetyPhraseRepository = new Mock<ISafetyPhraseRepository>();

            supplierRepository = new Mock<ISupplierRepository>();

            log = new Mock<IPeninsulaLog>();
            _target = new HazardousSubstancesService(
                repository.Object, 
                userRepository.Object,
                supplierRepository.Object,
                pictogramRepository.Object,
                riskPhraseRepository.Object, 
                safetyPhraseRepository.Object, null, log.Object);
        }
 public void Setup()
 {
     repository = new Mock<IHazardousSubstancesRepository>();
     log = new Mock<IPeninsulaLog>();
     _target = new HazardousSubstancesService(repository.Object, null, null, null, null, null, null, log.Object);
 }