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); } }
public void ProcessingIsPassedToTheHandlerForCorrectMessage() { Handler.ReceivedMessages.ShouldContain(SerializationRegister.DefaultDeserializedMessage()); }
public void HandlerReceivesMessage() { Handler.ReceivedMessages.Contains(SerializationRegister.DefaultDeserializedMessage()) .ShouldBeTrue(); }