public void IsCompleteShouldReturnFalseIfAllPacketsHaveBeenRead()
        {
            // Arrange
            var stream = new MessageBusReadStream { LastPacketNumber = 3, CompleteEventHandler = CompleteEventHandler };
            var bytes = new byte[10];
            stream.Write(bytes, 1);
            stream.Write(bytes, 2);

            // Act
            var result = stream.IsComplete();

            // Assert
            Assert.False(result);
        }
        public void IsCompleteShouldExecuteCompleteEventHandlerIfAllPacketsHaveBeenRead()
        {
            // Arrange
            var stream = new MessageBusReadStream { LastPacketNumber = 3, CompleteEventHandler = CompleteEventHandler };
            var bytes = new byte[10];
            stream.Write(bytes, 1);
            stream.Write(bytes, 2);
            stream.Read();
            stream.Read();

            // Act
            stream.IsComplete();

            // Assert
            Assert.True(_complete);
        }