public void Run() { var service = XrmCommand.GetService(); var core = new DuplicateRuleService(service); var rules = core.GetRulesFromConfig(WorkingDirectory); core.PublishRules(rules); }
public void Publish_Continues_On_Error() { Service.SetupSequence(s => s.Execute(It.IsAny <PublishDuplicateRuleRequest>())) .Throws(new Exception()) .Returns(new OrganizationResponse()); DuplicateRuleService.PublishRules(Guids); Service.Verify(s => s.Execute(It.IsAny <PublishDuplicateRuleRequest>()), Times.Exactly(2)); }