예제 #1
0
파일: TestSalesTeam.cs 프로젝트: MyRSG/COAT
        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);
        }
예제 #2
0
파일: TestSalesTeam.cs 프로젝트: MyRSG/COAT
        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);
        }
예제 #3
0
파일: TestSalesTeam.cs 프로젝트: MyRSG/COAT
        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);
        }