public void IsValidRequestMessage_WithNullMessage_IsFalse() { // Arrange var messageFactory = new NetMQMessageFactory(serializerCache, packageFactory); // Act var isValid = messageFactory.IsValidRequestMessage(null); // Assert Assert.That(isValid, Is.False); }
public void IsValidRequestMessage_WithEmptyAddress_IsFalse() { // Arrange var messageFactory = new NetMQMessageFactory(serializerCache, packageFactory); var message = messageFactory.CreateRequestMessage(obj, requestId); message.PushEmptyFrame(); // Act var isValid = messageFactory.IsValidRequestMessage(message); // Assert Assert.That(isValid, Is.False); }
public void IsValidRequestMessage_WithFiveFrameMessage_IsTrue() { // Arrange var messageFactory = new NetMQMessageFactory(serializerCache, packageFactory); var message = messageFactory.CreateRequestMessage(obj, 1); message.Push(address); // Act var isValid = messageFactory.IsValidRequestMessage(message); // Assert Assert.That(isValid, Is.True); }
public void IsValidRequestMessage_WithEmptyDataFrame_IsFalse() { // Arrange var messageFactory = new NetMQMessageFactory(serializerCache, packageFactory); var message = new NetMQMessage(5); message.Append(address); message.AppendEmptyFrame(); message.Append(requestId); message.AppendEmptyFrame(); message.AppendEmptyFrame(); // Act var isValid = messageFactory.IsValidRequestMessage(message); // Assert Assert.That(isValid, Is.False); }