コード例 #1
0
        public void DeleteLeadScoreRule_ValidRule_Succeed()
        {
            mockLeadScoreRuleRepository.Setup(a => a.DeactivateRules(It.IsAny <int[]>()));
            DeleteLeadScoreResponse response = leadScoreRuleService.UpdateLeadScoreStatus(new DeleteLeadScoreRequest()
            {
                RuleID = leadScoreRulevalues
            });

            mockRepository.VerifyAll();
            Assert.AreEqual(null, response.Exception);
        }
コード例 #2
0
        public void DeleteLeadScoreRule_RunTimeException_Failed()
        {
            mockLeadScoreRuleRepository.Setup(lsr => lsr.DeactivateRules(It.IsAny <int[]>())).Throws(new InvalidOperationException());
            DeleteLeadScoreResponse response = leadScoreRuleService.UpdateLeadScoreStatus(new DeleteLeadScoreRequest()
            {
                RuleID = leadScoreRulevalues
            });

            mockRepository.VerifyAll();
            Assert.AreEqual(typeof(InvalidOperationException), response.Exception.GetType());
            Assert.AreNotEqual(null, response.Exception);
        }