public void TestDeclineDeal() { var d = CreateDeal(); var args = new SalesTeamApprArgs { Comment = Comment }; var approval = Unit.Decline(d, args); AssertDeclineApproval(d, approval); Assert.AreEqual(WorkFlowStep.Decline, d.CurrentStep); }
public void TestAssignWrongDeal() { var d = GetDealFromChannelManager(); var args = new SalesTeamApprArgs { Comment = Comment }; var approval = Unit.AssignWrong(d, args); AssertAssignWrongApproval(d, approval); Assert.AreEqual(WorkFlowStep.ChannelManager, d.CurrentStep); d = GetDealFromInsideSales(); approval = Unit.AssignWrong(d, args); AssertAssignWrongApproval(d, approval); Assert.AreEqual(WorkFlowStep.InsideSales, d.CurrentStep); }
public void TestApproveDeal() { var d = CreateDeal(); var testAnswer = new TestAnswer { QuestionId = 1, Answer = "Test Answer" }; var args = new SalesTeamApprArgs { QuestionId = testAnswer.QuestionId, Answer = testAnswer.Answer, Comment = Comment }; var approval = Unit.Approve(d, args); AssertApproveApproval(d, approval); AssertAnswer(d, approval, testAnswer); Assert.AreEqual(WorkFlowStep.Approve, d.CurrentStep); d.Size = SalesTeam.DirectorSize; approval = Unit.Approve(d, args); AssertApproveApproval(d, approval); Assert.AreEqual(WorkFlowStep.Approve, d.CurrentStep); d.Size = SalesTeam.DirectorSize + 0.1; approval = Unit.Approve(d, args); AssertApproveApproval(d, approval); Assert.AreEqual(WorkFlowStep.ChannelDirector, d.CurrentStep); }