Beispiel #1
0
        public void op_Match_stringEmpty()
        {
            var obj = new LexicalCollection(NormalityComparer.OrdinalIgnoreCase)
            {
                new LexicalItem(NormalityComparer.Ordinal, "Example")
            };

            Assert.Null(obj.Match(string.Empty));
        }
Beispiel #2
0
        public void op_Match_stringNull()
        {
            var obj = new LexicalCollection(NormalityComparer.OrdinalIgnoreCase)
            {
                new LexicalItem(NormalityComparer.Ordinal, "Example")
            };

            Assert.Throws <ArgumentNullException>(() => obj.Match(null));
        }
Beispiel #3
0
        public void op_Match_string()
        {
            var obj = new LexicalCollection(NormalityComparer.OrdinalIgnoreCase)
            {
                new LexicalItem(NormalityComparer.Ordinal, "Example")
            };

            var expected = new LexicalMatch(obj.First());
            var actual   = obj.Match("EXAMPLE");

            Assert.Equal(expected, actual);
        }