public void Deprecated69_AllowedUse_Passes() { // Arrange var rule = new DeprecatedFeature69_sp_addserver(new RuleServices()); var sqlStatement = "Exec sp_addserver 'Accounts', 'local'"; var script = Analyzer.Parse(sqlStatement); // Act var results = rule.Evaluate(sqlStatement, script); // Assert Assert.IsTrue(results.Count == 0); }
public void Deprecated69_Warns() { // Arrange var rule = new DeprecatedFeature69_sp_addserver(new RuleServices()); var sqlStatement = "Exec sp_addserver"; var script = Analyzer.Parse(sqlStatement); // Act var results = rule.Evaluate(sqlStatement, script); // Assert Assert.IsTrue(results.Count == 1); Assert.AreEqual(results.Single().Rule, rule); }