コード例 #1
0
        public static async Task AnalyseRoutines_GivenRoutineWithNameContainingReservedKeyword_ProducesMessages()
        {
            var rule        = new ReservedKeywordNameRule(CreateFakeDialect(), RuleLevel.Error);
            var routineName = new Identifier("SELECT");

            var routine  = new DatabaseRoutine(routineName, "routine_definition");
            var routines = new[] { routine };

            var hasMessages = await rule.AnalyseRoutines(routines).AnyAsync().ConfigureAwait(false);

            Assert.That(hasMessages, Is.True);
        }
コード例 #2
0
        public static void AnalyseRoutines_GivenNullRoutines_ThrowsArgumentNullException()
        {
            var rule = new ReservedKeywordNameRule(CreateFakeDialect(), RuleLevel.Error);

            Assert.That(() => rule.AnalyseRoutines(null), Throws.ArgumentNullException);
        }