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); }
public static void AnalyseRoutines_GivenNullRoutines_ThrowsArgumentNullException() { var rule = new ReservedKeywordNameRule(CreateFakeDialect(), RuleLevel.Error); Assert.That(() => rule.AnalyseRoutines(null), Throws.ArgumentNullException); }