Example #1
0
        public void op_Match_string_whenOrdinalIgnoreCase()
        {
            var obj = new LexicalItem(NormalityComparer.OrdinalIgnoreCase, "Example");

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

            Assert.Equal(expected, actual);
        }
Example #2
0
        public void op_Match_stringNull_whenSynonyms()
        {
            var obj = new LexicalItem(NormalityComparer.Ordinal, "Example")
            {
                Synonyms =
                {
                    "Foo",
                    "Bar"
                }
            };

            Assert.Throws <ArgumentNullException>(() => obj.Match(null));
        }
Example #3
0
        public void op_Match_stringEmpty_whenSynonyms()
        {
            var obj = new LexicalItem(NormalityComparer.Ordinal, "Example")
            {
                Synonyms =
                {
                    "Foo",
                    "Bar"
                }
            };

            Assert.Null(obj.Match(string.Empty));
        }
Example #4
0
        public void op_Match_string_whenMatchesSynonym()
        {
            var obj = new LexicalItem(NormalityComparer.OrdinalIgnoreCase, "Example")
            {
                Synonyms =
                {
                    "Foo",
                    "Bar"
                }
            };

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

            Assert.Equal(expected, actual);
        }
Example #5
0
        public void op_Match_string_whenOrdinalIgnoreCase()
        {
            var obj = new LexicalItem(NormalityComparer.OrdinalIgnoreCase, "Example");

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

            Assert.Equal(expected, actual);
        }
Example #6
0
        public void op_Match_string_whenMatchesSynonym()
        {
            var obj = new LexicalItem(NormalityComparer.OrdinalIgnoreCase, "Example")
                          {
                              Synonyms =
                                  {
                                      "Foo",
                                      "Bar"
                                  }
                          };

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

            Assert.Equal(expected, actual);
        }
Example #7
0
        public void op_Match_stringNull_whenSynonyms()
        {
            var obj = new LexicalItem(NormalityComparer.Ordinal, "Example")
                          {
                              Synonyms =
                                  {
                                      "Foo",
                                      "Bar"
                                  }
                          };

            Assert.Throws<ArgumentNullException>(() => obj.Match(null));
        }
Example #8
0
        public void op_Match_stringNull()
        {
            var obj = new LexicalItem(NormalityComparer.Ordinal, "Example");

            Assert.Throws<ArgumentNullException>(() => obj.Match(null));
        }
Example #9
0
        public void op_Match_stringEmpty_whenSynonyms()
        {
            var obj = new LexicalItem(NormalityComparer.Ordinal, "Example")
                          {
                              Synonyms =
                                  {
                                      "Foo",
                                      "Bar"
                                  }
                          };

            Assert.Null(obj.Match(string.Empty));
        }
Example #10
0
        public void op_Match_stringEmpty()
        {
            var obj = new LexicalItem(NormalityComparer.Ordinal, "Example");

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

            Assert.Throws <ArgumentNullException>(() => obj.Match(null));
        }
Example #12
0
        public void op_Match_stringEmpty()
        {
            var obj = new LexicalItem(NormalityComparer.Ordinal, "Example");

            Assert.Null(obj.Match(string.Empty));
        }