public void FahClientPyonMessageExtractor_ReturnsNullWhenBufferIsNull()
        {
            // Arrange
            var extractor = new FahClientPyonMessageExtractor();
            // Act
            var result = extractor.Extract(null);

            // Assert
            Assert.IsNull(result);
        }
        public void FahClientPyonMessageExtractor_CannotExtractMessageWithNoFooter()
        {
            // Arrange
            var extractor = new FahClientPyonMessageExtractor();
            var buffer    = new StringBuilder(Info.Substring(0, Info.Length / 2));
            // Act
            var result = extractor.Extract(buffer);

            // Assert
            Assert.IsNull(result);
        }
        public void FahClientPyonMessageExtractor_CannotExtractMessageWithNoHeader()
        {
            // Arrange
            var extractor = new FahClientPyonMessageExtractor();
            var buffer    = new StringBuilder();
            // Act
            var result = extractor.Extract(buffer);

            // Assert
            Assert.IsNull(result);
        }
        public void FahClientPyonMessageExtractor_ExtractsSingleMessageFromMultipleMessages()
        {
            // Arrange
            var extractor = new FahClientPyonMessageExtractor();
            var buffer    = new StringBuilder(Info + SimulationInfo);
            // Act
            var result = extractor.Extract(buffer);

            // Assert
            Assert.AreEqual("info", result.Identifier.MessageType);
            Assert.AreEqual(Info, result.MessageText.ToString());
        }