Ejemplo n.º 1
0
        public void when_requesting_equal_text_returns_correct_sql_string()
        {
            var filter = new StringTextFilter("notes", "", StringTextFilterMode.Equal);
            var result = filter.GetMySqlString();

            Assert.That(result, Is.EqualTo("notes = ''"));
        }
Ejemplo n.º 2
0
        public void when_requesting_exact_string_returns_correct_sql_string()
        {
            var filter = new StringTextFilter("email", "*****@*****.**", StringTextFilterMode.Equal);
            var result = filter.GetMySqlString();

            Assert.That(result, Is.EqualTo("email = '*****@*****.**'"));
        }
Ejemplo n.º 3
0
        public void when_requesting_contains_text_returns_correct_sql_string()
        {
            var filter = new StringTextFilter("notes", "a", StringTextFilterMode.Contains);
            var result = filter.GetMySqlString();

            Assert.That(result, Is.EqualTo("notes LIKE '%a%'"));
        }
Ejemplo n.º 4
0
        public void when_requesting_ending_with_string_returns_correct_sql_string()
        {
            var filter = new StringTextFilter("email", ".com", StringTextFilterMode.Ends);
            var result = filter.GetMySqlString();

            Assert.That(result, Is.EqualTo("email LIKE '%.com'"));
        }