An id for a redis message
상속: IMessageId
예제 #1
0
 public void Create_Default_Empty()
 {
     var id = string.Empty;
     var test = new RedisQueueId(id);
     Assert.Equal(id, test.Id.Value);
     Assert.False(test.HasValue);
 }
예제 #2
0
 public void Create_Default()
 {
     const long id = 1;
     var test = new RedisQueueId(id.ToString());
     Assert.Equal(id.ToString(), test.Id.Value);
     Assert.True(test.HasValue);
 }
 public void Create_Default(string number, int metaNumber)
 {
     var id = new RedisQueueId(number);
     var meta = new RedisMetaData(metaNumber);
     var test = new SaveMetaDataCommand(id, meta);
     Assert.Equal(id, test.Id);
     Assert.Equal(meta, test.MetaData);
 }
        public void Create_Default(string number)
        {
            var id = new RedisQueueId(number);
            var test = new RollbackMessageCommand(id, null);
            Assert.Equal(id, test.Id);
            Assert.Null(test.IncreaseQueueDelay);

            TimeSpan? time = TimeSpan.MinValue;
            test = new RollbackMessageCommand(id, time);
            Assert.Equal(id, test.Id);
            Assert.Equal(time, test.IncreaseQueueDelay);
        }
 public void Create_Default(string number)
 {
     var id = new RedisQueueId(number);
     var test = new DeleteMessageCommand(id);
     Assert.Equal(id, test.Id);
 }
 public void Create_Default(string number)
 {
     var id = new RedisQueueId(number);
     var test = new GetMetaDataQuery(id);
     Assert.Equal(id, test.Id);
 }
 public void Create_Default(string number)
 {
     var id = new RedisQueueId(number);
     var test = new MoveRecordToErrorQueueCommand(id);
     Assert.Equal(id, test.QueueId);
 }
예제 #8
0
 public void Create_Default_ToString()
 {
     const long id = 1;
     var test = new RedisQueueId(id.ToString());
     Assert.Equal("1", test.ToString());
 }