public void IsMatch_should_return_false_when_no_match_list() { // Arrange var rule = new GroupingRule(); var usingStatement = new UsingStatement() { Namespace = "Foo" }; // Act var result = rule.IsMatch(usingStatement); // Assert result.Should().BeFalse(); }
public void IsMatch_should_return_true_when_prefix_match([Values] MatchingEntryIndex matching) { // Arrange var rule = new GroupingRule(); rule.MatchList.Add("Foo"); rule.MatchList.Add("Bar"); rule.MatchList.Add("Qux"); var usingStatement = new UsingStatement() { Namespace = rule.MatchList[(int)matching] + ".Common" }; // Act var result = rule.IsMatch(usingStatement); // Assert result.Should().BeTrue(); }
public void IsMatch_should_return_false_when_no_matches() { // Arrange var rule = new GroupingRule(); rule.MatchList.Add("Foo"); rule.MatchList.Add("Bar"); rule.MatchList.Add("Qux"); var usingStatement = new UsingStatement() { Namespace = "Eenp" }; // Act var result = rule.IsMatch(usingStatement); // Assert result.Should().BeFalse(); }