Exemple #1
0
        public void IsValidTopicMessage_WithNullMessage_IsFalse()
        {
            // Arrange
            var messageFactory = new NetMQMessageFactory(serializerCache, packageFactory);

            // Act
            var isValid = messageFactory.IsValidTopicMessage(null);

            // Assert
            Assert.That(isValid, Is.False);
        }
Exemple #2
0
        public void IsValidTopicMessage_WithNoData_IsFalse()
        {
            // Arrange
            var messageFactory = new NetMQMessageFactory(serializerCache, packageFactory);
            var message        = new NetMQMessage(2);

            message.Push("Topic");
            message.PushEmptyFrame();

            // Act
            var isValid = messageFactory.IsValidTopicMessage(message);

            // Assert
            Assert.That(isValid, Is.False);
        }
Exemple #3
0
        public void IsValidTopicMessage_WithWellFormedMessage_IsTrue()
        {
            // Arrange
            var messageFactory = new NetMQMessageFactory(serializerCache, packageFactory);
            var message        = new NetMQMessage(2);

            message.Push("Topic");
            message.Push(data);

            // Act
            var isValid = messageFactory.IsValidTopicMessage(message);

            // Assert
            Assert.That(isValid, Is.True);
        }