Esempio n. 1
0
        public void Log_ReadFromMemoryInput()
        {
            var input = new MemoryInput(new List <string>
            {
                "[2864] [2019-08-10 19:00:07.482] [persist] [info] Change CreditsCents delta: 332 balance: 1120",
                "[2864] [2019-08-10 21:00:07.482] [persist] [info] Change CreditsCents delta: 332 balance: 1120"
            });
            var log = new Log("GameWarrior", new GameWarriorLogParser(), input);

            Assert.AreEqual(2, log.EntriesCount);
        }
Esempio n. 2
0
        public void Read_ShouldGetConsecutiveAsciiBytes()
        {
            var input = new MemoryInput("Hello World!");

            // 0x48 is ASCII 'H', 0x65 is 'e'
            var b = input.Read();

            Assert.Equal(0x48, b);

            b = input.Read();
            Assert.Equal(0x65, b);
        }