public void Run() { var service = XrmCommand.GetService(); var core = new DuplicateRuleService(service); var rules = core.GetRulesFromConfig(WorkingDirectory); core.PublishRules(rules); }
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); }
public void Get_Rules_Throws_If_Directory_Not_Found() { DuplicateRuleService.GetRulesFromConfig(@"C:\SomeoneElsesGuids"); }
public void Get_Rules_Throws_If_Directory_IsEmpty() { DuplicateRuleService.GetRulesFromConfig(""); }