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); }
public void FillInformation(Project filledProject) { if (_workflow.IsMoveablde(ProjectWorkflow.Trigger.FillInformation)) { _repository.Update(filledProject); _workflow.Move(ProjectWorkflow.Trigger.FillInformation); } else { _repository.Update(filledProject); } }