public void Match_WithPairHavingNegativeMatchNumber_ShouldNotThrowException() { var pairs = new MatchPair[] { new MatchPair(2, "Fizz"), new MatchPair(-1, "Fizzer"), }; Assert.DoesNotThrow(() => _sut.Match(pairs, 1).ToList()); }
public void Match_WithPairHavingNegativeMatchNumber_ShouldMatch() { const string invalidText = "Fizzer"; var pairs = new MatchPair[] { new MatchPair(2, "Fizz"), new MatchPair(-1, invalidText), }; var replacements = _sut.Match(pairs, 2).ToList(); Assert.AreEqual(2, replacements.Count(r => r.Contains(invalidText))); }
public void Match_WithPairsHavingZeroForMatchNumber_ShouldNotThrowException() { var pairs = new MatchPair[] { new MatchPair(0, "Fizz"), new MatchPair() { TextContent = "Fizz2" } }; Assert.DoesNotThrow(() => _sut.Match(pairs, 1).ToList()); }