Exemplo n.º 1
0
        private List <Operator> GetOperators()
        {
            OperatorRepository operatorRepository = new OperatorRepository(this.UnitOfWork);
            var operators = operatorRepository.GetAll();

            return(operators.ToList());
        }
Exemplo n.º 2
0
 public void OperatorsLoad()
 {
     using (IUnitOfWork uow = UnitOfWorkFactory.Create())
     {
         OperatorRepository operatorRepository = new OperatorRepository(uow);
         var operators = operatorRepository.GetAll();
         foreach (Operator op in operators)
         {
             long     identity   = op.Id;
             Operator wfOperator = operatorRepository.GetById(identity);
             Assert.Equal(op.GetSummary(), wfOperator.GetSummary());
         }
     }
 }
Exemplo n.º 3
0
 public void OperatorUpdate()
 {
     using (IUnitOfWork uow = UnitOfWorkFactory.Create())
     {
         OperatorRepository operatorRepository = new OperatorRepository(uow);
         var operators = operatorRepository.GetAll();
         if (operators.Count > 0)
         {
             Operator myoperator = operators.FirstOrDefault();
             myoperator.EMail += " (up)";
             operatorRepository.Update(myoperator);
         }
     }
 }
Exemplo n.º 4
0
 public void MissionInsert()
 {
     using (IUnitOfWork uow = UnitOfWorkFactory.Create())
     {
         ActivityRepository activityRepository = new ActivityRepository(uow);
         OperatorRepository operatorRepository = new OperatorRepository(uow);
         MissionRepository  missionRepository  = new MissionRepository(uow);
         var     fA         = activityRepository.GetAll().FirstOrDefault();
         var     fO         = operatorRepository.GetAll().FirstOrDefault();
         Mission newMission = new Mission()
         {
             Description = "OnlyForTest",
             WFOperator  = fO,
             Activity    = fA,
             StartDate   = DateTime.Now
         };
         missionRepository.Insert(newMission);
     }
 }