예제 #1
0
 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"));
 }
예제 #2
0
 public void GiveListOfRules_WhenTextIsEmpty_ReturnEmptyList()
 {
     var provider = new TextRulesProvider(string.Empty);
     Assert.AreEqual(provider.GiveListOfRules("None"), new List<Rule>());
 }