예제 #1
0
        public void MessageIsLocked()
        {
            var messageId = SerializationRegister.DefaultDeserializedMessage().Id.ToString();

            var tempLockRequests = _messageLock.MessageLockRequests.Where(lr => !lr.isPermanent);

            tempLockRequests.Count().ShouldBeGreaterThan(0);
            tempLockRequests.ShouldAllBe(pair =>
                                         pair.key.Contains(messageId, StringComparison.OrdinalIgnoreCase) &&
                                         pair.howLong == TimeSpan.FromSeconds(_expectedTimeout));
        }
        public void MessageIsLocked()
        {
            var messageId = SerializationRegister.DefaultDeserializedMessage().Id.ToString();

            var tempLockRequests = _messageLock.MessageLockRequests.Where(lr => !lr.isPermanent);

            tempLockRequests.ShouldNotBeEmpty();

            foreach (var lockRequest in tempLockRequests)
            {
                lockRequest.key.ShouldContain(messageId, Case.Insensitive);
                ((int)lockRequest.howLong.TotalSeconds).ShouldBe(_maximumTimeout);
            }
        }
예제 #3
0
 public void ProcessingIsPassedToTheHandlerForCorrectMessage()
 {
     Handler.ReceivedMessages.ShouldContain(SerializationRegister.DefaultDeserializedMessage());
 }
예제 #4
0
 public void HandlerReceivesMessage()
 {
     Handler.ReceivedMessages.Contains(SerializationRegister.DefaultDeserializedMessage())
     .ShouldBeTrue();
 }