public void VerifyMessage(EnqueueMessageContractV1 message, MessageContractV1 readMessage, int agentId, bool testLock) { readMessage.Should().NotBeNull(); readMessage.QueueId.Should().BeGreaterOrEqualTo(0); readMessage.MessageId.Should().BeGreaterOrEqualTo(0); readMessage.CreatedByAgentId.Should().Be(agentId); readMessage.ClientMessageId.Should().Be(message.ClientMessageId); readMessage.Cv.Should().Be(message.Cv); readMessage.Payload.Should().Be(message.Payload); if (testLock) { readMessage.LockedByAgentId.Should().Be(agentId); } WorkRequest readWorkRequest = readMessage.Deserialize <WorkRequest>(); readWorkRequest.Should().NotBeNull(); readWorkRequest.ProcessName.Should().Be("this process"); readWorkRequest.Parameters.Should().NotBeNull(); readWorkRequest.Parameters.Count().Should().Be(3); }