public void GiveListOfRules_WhenTextContainsOneRule_ReturnListWithOneRule() { const string Text = "FirstFora : SecondFora;"; var expectedRuleList = new List<Rule> { new Rule( new List<CoefType> { CoefType.FirstFora }, new List<CoefType> { CoefType.SecondFora }) }; var provider = new TextRulesProvider(Text); CollectionAssert.AreEqual(expectedRuleList, provider.GiveListOfRules("None")); }
public void GiveListOfRules_WhenTextIsEmpty_ReturnEmptyList() { var provider = new TextRulesProvider(string.Empty); Assert.AreEqual(provider.GiveListOfRules("None"), new List<Rule>()); }