コード例 #1
0
        public void LogLineEnumerable_FromFahLog_Test()
        {
            // Arrange
            var fahLog = FahClientLog.Read(TestDataReader.ReadStream("Client_v7_16_log.txt"));
            // Act
            var enumerable = LogLineEnumerable.Create(fahLog);

            // Assert
            Assert.AreEqual(34346, enumerable.Count());
        }
コード例 #2
0
        public void LogLineEnumerable_FromFahLog_Test()
        {
            // Arrange
            var fahLog = FahClientLog.Read("..\\..\\..\\TestFiles\\Client_v7_16\\log.txt");
            // Act
            var enumerable = LogLineEnumerable.Create(fahLog);

            // Assert
            Assert.AreEqual(34346, enumerable.Count());
        }
コード例 #3
0
        public void LogLineEnumerable_FromUnitRun_Test()
        {
            // Arrange
            var fahLog  = FahClientLog.Read(TestDataReader.ReadStream("Client_v7_16_log.txt"));
            var unitRun = fahLog.ClientRuns.Last().SlotRuns[0].UnitRuns.Last();
            // Act
            var enumerable = LogLineEnumerable.Create(unitRun);

            // Assert
            Assert.AreEqual(150, enumerable.Count());
        }
コード例 #4
0
        public void LogLineEnumerable_FromUnitRun_Test()
        {
            // Arrange
            var fahLog  = FahClientLog.Read("..\\..\\..\\TestFiles\\Client_v7_16\\log.txt");
            var unitRun = fahLog.ClientRuns.Last().SlotRuns[0].UnitRuns.Last();
            // Act
            var enumerable = LogLineEnumerable.Create(unitRun);

            // Assert
            Assert.AreEqual(150, enumerable.Count());
        }
コード例 #5
0
        public void FahClientLog_DefineCustomLogLineTypeAndParseData_Test()
        {
            // Arrange
            var log = new FahClientLog();

            using (var textReader = new StreamReader("..\\..\\..\\TestFiles\\Client_v7_10\\log.txt"))
                using (var reader = new CustomFahClientLogTextReader(textReader))
                {
                    // Act
                    log.Read(reader);
                }
            var lines = LogLineEnumerable.Create(log).Where(x => x.LineType == CustomLogLineType.ConnectingTo).ToList();

            foreach (var logLine in lines)
            {
                System.Diagnostics.Debug.WriteLine(logLine.Data);
            }
            // Assert
            Assert.IsTrue(lines.Count > 0);
        }