public void Test_Clone() { var test = new SqlConnectionInformation("blah", GoodConnection); var clone = test.Clone(); Assert.Equal(test.ConnectionString, clone.ConnectionString); Assert.Equal(test.QueueName, clone.QueueName); }
public void GetSet_Connection_Bad_Exception() { Assert.Throws<ArgumentException>( delegate { var test = new SqlConnectionInformation(string.Empty, BadConnection); }); }
public VerifyQueueRecordCount(string queueName, PostgreSqlMessageQueueTransportOptions options) { var queueConnection = new QueueConnection(queueName, ConnectionInfo.ConnectionString); _options = options; _connection = new SqlConnectionInformation(queueConnection); _tableNameHelper = new TableNameHelper(_connection); }
public void GetSet_Connection_Bad_Exception() { Assert.Throws <ArgumentException>( delegate { // ReSharper disable once UnusedVariable var test = new SqlConnectionInformation(string.Empty, BadConnection); }); }
public static void SetError(string queueName, string connectionString) { var connection = new SqlConnectionInformation(queueName, connectionString); var helper = new TableNameHelper(connection); using (var conn = new NpgsqlConnection(connectionString)) { conn.Open(); using (var command = conn.CreateCommand()) { command.CommandText = $"update {helper.StatusName} set status = 2"; command.ExecuteNonQuery(); } } }
public static void SetError(string queueName, string connectionString, ICreationScope scope) { var connection = new SqlConnectionInformation(queueName, connectionString); var helper = new TableNameHelper(connection); using (var conn = new SqlConnection(connectionString)) { conn.Open(); using (var command = conn.CreateCommand()) { command.CommandText = $"update {helper.StatusName} set status = 2"; command.ExecuteNonQuery(); } } }
public static void Verify(string queueName, string connectionString, long messageCount) { var connection = new SqlConnectionInformation(queueName, connectionString); var helper = new TableNameHelper(connection); using (var conn = new NpgsqlConnection(connectionString)) { conn.Open(); using (var command = conn.CreateCommand()) { command.CommandText = $"select count(*) from {helper.StatusName}"; using (var reader = command.ExecuteReader()) { Assert.True(reader.Read()); var records = reader.GetInt32(0); Assert.Equal(messageCount, records); } } } }
public static void Verify(string queueName, string connectionString, long messageCount, ICreationScope scope) { var connection = new SqlConnectionInformation(queueName, connectionString); var helper = new TableNameHelper(connection); using (var conn = new SqlConnection(connectionString)) { conn.Open(); using (var command = conn.CreateCommand()) { command.CommandText = $"select count(*) from {helper.StatusName}"; using (var reader = command.ExecuteReader()) { Assert.True(reader.Read()); var records = reader.GetInt32(0); Assert.Equal(messageCount, records); } } } }
public VerifyQueueData(string queueName, SqlServerMessageQueueTransportOptions options) { _options = options; _connection = new SqlConnectionInformation(queueName, ConnectionInfo.ConnectionString); _tableNameHelper = new TableNameHelper(_connection); }
public VerifyErrorCounts(string queueName) { _connection = new SqlConnectionInformation(queueName, ConnectionInfo.ConnectionString); _tableNameHelper = new TableNameHelper(_connection); }
public void GetSet_Connection() { var test = new SqlConnectionInformation(string.Empty, GoodConnection); Assert.NotNull(test); }
public VerifyQueueRecordCount(string queueName, PostgreSqlMessageQueueTransportOptions options) { _options = options; _connection = new SqlConnectionInformation(queueName, ConnectionInfo.ConnectionString); _tableNameHelper = new TableNameHelper(_connection); }
public VerifyErrorCounts(QueueConnection queueConnection) { _connection = new SqlConnectionInformation(queueConnection); _tableNameHelper = new SqlServerTableNameHelper(_connection); }
public VerifyQueueRecordCount(QueueConnection queueConnection, SqlServerMessageQueueTransportOptions options) { _options = options; _connection = new SqlConnectionInformation(queueConnection); _tableNameHelper = new SqlServerTableNameHelper(_connection); }