public void Assign_Workflows_Continues_On_Exception() { Service.SetupSequence(s => s.Execute(It.IsAny <AssignRequest>())) .Throws(new Exception()) .Returns(new AssignResponse()); Workflows.AssignWorkflowsToUser(WorkflowCollection, Guid.NewGuid()); Service.Verify(s => s.Execute(It.IsAny <AssignRequest>()), Times.Exactly(2)); }
public void Assigns_To_Given_UserId() { var userId = Guid.NewGuid(); var assignRequest = new AssignRequest(); Service.Setup(s => s.Execute(It.IsAny <AssignRequest>())) .Returns(new AssignResponse()) .Callback <AssignRequest>(a => assignRequest = a); Workflows.AssignWorkflowsToUser(WorkflowCollection, userId); Assert.AreEqual(userId, assignRequest.Assignee.Id); }
public void Assign_Workflows_Throws_If_UserId_IsEmpty() { Workflows.AssignWorkflowsToUser(WorkflowCollection, Guid.Empty); }
public void Assign_Workflows_Executes_AssignRequest() { Workflows.AssignWorkflowsToUser(WorkflowCollection, Guid.NewGuid()); Service.Verify(s => s.Execute(It.IsAny <AssignRequest>()), Times.Exactly(2)); }
public void Assign_Workflows_Throws_If_WorkflowCollection_IsNull() { Workflows.AssignWorkflowsToUser(null, Guid.NewGuid()); }