Esempio n. 1
0
        public void Matches_ThrowsWhenNullString()
        {
            var detector = new FlagsStringMatcher(ProjectTreeFlags.Empty);

            Assert.Throws <ArgumentNullException>(() => detector.Matches(null !));
        }
Esempio n. 2
0
        public void Matches_SingleFlag_CaseInsensitive(string s, bool expected)
        {
            var detector = new FlagsStringMatcher(ProjectTreeFlags.Create("APPLE"), RegexOptions.IgnoreCase);

            Assert.Equal(expected, detector.Matches(s));
        }
Esempio n. 3
0
        public void Matches_MultipleFlags(string s, bool expected)
        {
            var detector = new FlagsStringMatcher(ProjectTreeFlags.Create("APPLE") + ProjectTreeFlags.Create("BANANA"));

            Assert.Equal(expected, detector.Matches(s));
        }
Esempio n. 4
0
        public void Matches_EmptyFlags(string s)
        {
            var detector = new FlagsStringMatcher(ProjectTreeFlags.Empty);

            Assert.True(detector.Matches(s));
        }