Example #1
0
            public void Returns_Error_For_Hanselman_Dump_Without_ERR_Tag()
            {
                var log  = DumpReader.Read("ScottHanselmanLogExample.txt");
                var item = _parser.Parse(log);

                item.AccumulatedState.Should().Be(LogItem.State.Error);
            }
Example #2
0
            public void Returns_Error_For_German_Dump_Without_ERR_Tag()
            {
                var log  = DumpReader.Read("GermanFailedTextWithoutERRTag.txt");
                var item = _parser.Parse(log);

                item.AccumulatedState.Should().Be(LogItem.State.Error);
            }
Example #3
0
            public async Task Parses_All_Items_Of_LogFile1()
            {
                var contentToParse = DumpReader.Read("LogFile1.txt");
                var parser         = new LogFileParser(new LogItemParser(), new PathAsContentRoutingFileReader(), new StringAsFileService(contentToParse));
                var items          = await parser.ParseAsync();

                items.Count.Should().Be(6);
            }
Example #4
0
            public void Parses_Real_World_Dump_As_Expected()
            {
                var log  = DumpReader.Read("LogItem1.txt");
                var item = _parser.Parse(log);

                item.AccumulatedState.Should().Be(LogItem.State.Information);
                item.AppBase.Should().Be("file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/MSBuild/15.0/Bin/");
                item.AppName.Should().Be("MSBuild.exe");
                item.CacheBase.Should().Be("");
                item.CallingAssembly.Should().Be("(Unknown)");
                item.DisplayName.Should().Be("System.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL");
                item.DynamicPath.Should().Be("");
                item.FullMessage.Length.Should().Be(1424);
                item.IsValid.Should().Be(true);
                item.PrivatePath.Should().Be("");
                item.TimeStampUtc.ToLocalTime().Should().Be(new DateTime(2018, 06, 26, 18, 09, 20));
            }