Defines a connection to a queue
Inheritance: IConnectionInformation
 public VerifyQueueData(string queueName, QueueProducerConfiguration configuration, string connectionString)
 {
     _configuration = configuration;
     var connection = new BaseConnectionInformation(queueName, connectionString);
     _redisNames = new RedisNames(connection);
     _connection = new RedisConnection(connection);
 }
        public void Test_Clone(string queue, string connection)
        {
            var test = new BaseConnectionInformation(queue, connection);
            var clone = (BaseConnectionInformation)test.Clone();

            Assert.Equal(test.ConnectionString, clone.ConnectionString);
            Assert.Equal(test.QueueName, clone.QueueName);
        }
Example #3
0
 public static void SetError(string queueName, string connectionString)
 {
     var connectionInfo = new BaseConnectionInformation(queueName, connectionString);
     var conn = new RedisConnection(connectionInfo);
     var redisNames = new RedisNames(connectionInfo);
     var db = conn.Connection.GetDatabase();
     var id = db.HashGet(redisNames.JobNames, "job1");
     db.HashSet(redisNames.Status, id,
        "2");
 }
Example #4
0
 public static void Verify(string queueName, string connectionString, long messageCount)
 {
     var connectionInfo = new BaseConnectionInformation(queueName, connectionString);
     var redisNames = new RedisNames(connectionInfo);
     using (var connection = new RedisConnection(connectionInfo))
     {
         var db = connection.Connection.GetDatabase();
         var records = db.HashLength(redisNames.Values);
         Assert.Equal(messageCount, records);
     }
 }
 public void GetSet_Queue(string expected)
 {
     var test = new BaseConnectionInformation(expected, string.Empty);
     Assert.Equal(expected, test.QueueName);
 }
 public void GetSet_Connection(string expected)
 {
     var test = new BaseConnectionInformation(string.Empty, expected);
     Assert.Equal(expected, test.ConnectionString);
 }
 public VerifyErrorCounts(string queueName, string connectionString)
 {
     var connection = new BaseConnectionInformation(queueName, connectionString);
     _redisNames = new RedisNames(connection);
     _connection = new RedisConnection(connection);
 }