コード例 #1
0
        public void Run()
        {
            var service = XrmCommand.GetService();

            var core  = new DuplicateRuleService(service);
            var rules = core.GetRulesFromConfig(WorkingDirectory);

            core.PublishRules(rules);
        }
コード例 #2
0
        public void Gets_Rules_Formatted_From_Directory()
        {
            var directory = @"C:\MyGuids";

            DuplicateRuleService.StorePublishedRules(Guids, directory);

            Assert.IsTrue(FileManager.FileSystem.File.Exists(@"C:\MyGuids\PublishedDuplicateDetectionRules.json"));

            var rules = DuplicateRuleService.GetRulesFromConfig(directory);

            CollectionAssert.AreEqual(Guids, rules);
        }
コード例 #3
0
 public void Get_Rules_Throws_If_Directory_Not_Found()
 {
     DuplicateRuleService.GetRulesFromConfig(@"C:\SomeoneElsesGuids");
 }
コード例 #4
0
 public void Get_Rules_Throws_If_Directory_IsEmpty()
 {
     DuplicateRuleService.GetRulesFromConfig("");
 }