Exemplo n.º 1
0
        public void MatchWhenCalledAndThereIsNoMatchReturnsMinusOne()
        {
            var matcher = new RegExMatcher("POSH");

            Assert.That(matcher.Match("SET PUSH"), Is.EqualTo(string.Empty));
        }
Exemplo n.º 2
0
        public void MatchWhenCalledAndMatchedTextIsNotPrefixofTextReturnsStringEmpty()
        {
            var matcher = new RegExMatcher("PUSH");

            Assert.That(matcher.Match("SET PUSH"), Is.EqualTo(string.Empty));
        }
Exemplo n.º 3
0
        public void MatchWhenCalledReturnsStartIndexOfMatch()
        {
            var matcher = new RegExMatcher(string.Empty);

            Assert.That(matcher.Match(string.Empty), Is.EqualTo(string.Empty));
        }
Exemplo n.º 4
0
        public void MatchWhenConstructedAcceptsThePatternUsedToMatch()
        {
            var matcher = new RegExMatcher("SET");

            Assert.That(matcher.Match("SET PUSH"), Is.EqualTo("SET"));
        }
Exemplo n.º 5
0
        public void MatchWhenCalledMatchesTheProvideStringWithPatern()
        {
            var matcher = new RegExMatcher(string.Empty);

            Assert.That(matcher.Match(string.Empty), Is.EqualTo(string.Empty));
        }