示例#1
0
        public void ReOpnFromMapTransition()
        {
            _roles = new List <string> {
                "User"
            };
            MyTestInitialize();
            _workflow = Wrapper();
            _workflow.Move(ProjectWorkflow.Trigger.FillInformation);
            Assert.IsTrue(_repository.GetOne <Project>(p => p._id == _currentProject._id).WorkflowState.CurrentState ==
                          ProjectWorkflow.State.OnMap);

            _roles = new List <string> {
                "Admin"
            };
            MyTestInitialize();
            _workflow.Move(ProjectWorkflow.Trigger.ReOpen);
            Assert.IsTrue(_repository.GetOne <Project>(p => p._id == _currentProject._id).WorkflowState.CurrentState ==
                          ProjectWorkflow.State.Open);
        }
示例#2
0
 public void FillInformation(Project filledProject)
 {
     if (_workflow.IsMoveablde(ProjectWorkflow.Trigger.FillInformation))
     {
         _repository.Update(filledProject);
         _workflow.Move(ProjectWorkflow.Trigger.FillInformation);
     }
     else
     {
         _repository.Update(filledProject);
     }
 }