public void TestParseConstant() { using (TransactionScope tx = new TransactionScope(TransactionScopeOption.Required)) { TestDbProviderFactory.DefinedNextResult(new List <Bean>()); SqlServerCommand command = new SqlServerCommand("test", SqlResource.ResourceManager, "SqlTestConst"); command.ExecuteReader(); Assert.IsTrue(command.CommandText.Contains("'5' = 5")); command.Dispose(); } }
public void TestParseCurrentUserId() { using (TransactionScope tx = new TransactionScope(TransactionScopeOption.Required)) { TestDbProviderFactory.DefinedNextResult(new List <Bean>()); SqlServerCommand command = new SqlServerCommand("test", SqlResource.ResourceManager, "SqlTestUserId"); command.ExecuteReader(); Assert.IsTrue(command.CommandText.Contains(":CURRENT_USER_ID IS NOT NULL")); command.Dispose(); } }