public void NotParsed() { const String messageString = "Some message\r\n"; const String messageString2 = "Exception thrown: 'blablabla\r\n"; const String messageString3 = "A first chance exception of type 'blablabla\r\n"; var span = Utils.CreateSpan(messageString); var parser = new DebugExceptionParser(); DebugExceptionData parsedData; var parsed = parser.TryParse(span, out parsedData); Assert.IsFalse(parsed); Assert.IsNull(parsedData); span = Utils.CreateSpan(messageString2); parser = new DebugExceptionParser(); parsed = parser.TryParse(span, out parsedData); Assert.IsFalse(parsed); Assert.IsNull(parsedData); span = Utils.CreateSpan(messageString3); parser = new DebugExceptionParser(); parsed = parser.TryParse(span, out parsedData); Assert.IsFalse(parsed); Assert.IsNull(parsedData); }
public void NotParsed() { const String messageString = "Some message\r\n"; const String messageString2 = "Exception thrown: 'blablabla\r\n"; const String messageString3 = "A first chance exception of type 'blablabla\r\n"; var span = Utils.CreateSpan(messageString); var parser = new DebugExceptionParser(); DebugExceptionData parsedData; var parsed = parser.TryParse(span, out parsedData); Assert.IsFalse(parsed); Assert.IsNull(parsedData); span = Utils.CreateSpan(messageString2); parser = new DebugExceptionParser(); parsed = parser.TryParse(span, out parsedData); Assert.IsFalse(parsed); Assert.IsNull(parsedData); span = Utils.CreateSpan(messageString3); parser = new DebugExceptionParser(); parsed = parser.TryParse(span, out parsedData); Assert.IsFalse(parsed); Assert.IsNull(parsedData); }
public void Exception(String message, DebugExceptionData expectedResult) { var span = Utils.CreateSpan(message); var parser = new DebugExceptionParser(); DebugExceptionData actualResult; var parsed = parser.TryParse(span, out actualResult); parsed.Should().BeTrue(); actualResult.ShouldBeEquivalentTo(expectedResult); }
public void NotParsed(String message) { var span = Utils.CreateSpan(message); var parser = new DebugExceptionParser(); DebugExceptionData actualResult; var parsed = parser.TryParse(span, out actualResult); parsed.Should().BeFalse(); actualResult.Should().BeNull(); }
public void ExceptionVS2013() { const String messageString = "A first chance exception of type 'System.Exception' occurred in ConsoleDemo.exe\r\n"; var span = Utils.CreateSpan(messageString); var parser = new DebugExceptionParser(); DebugExceptionData data; var parsed = parser.TryParse(span, out data); Assert.IsTrue(parsed); Assert.IsNotNull(data); Assert.IsTrue(data.Exception.HasValue); Assert.IsTrue(data.Assembly.HasValue); Assert.AreEqual("System.Exception", data.Exception); Assert.AreEqual("ConsoleDemo.exe", data.Assembly); Assert.AreEqual(new Span(34, 16), data.Exception.Span); Assert.AreEqual(new Span(64, 15), data.Assembly.Span); }
public void Exception() { const String messageString = "Exception thrown: 'System.Exception' in VSOutputEnhancerDemo.exe\r\n"; var span = Utils.CreateSpan(messageString); var parser = new DebugExceptionParser(); DebugExceptionData data; var parsed = parser.TryParse(span, out data); Assert.IsTrue(parsed); Assert.IsNotNull(data); Assert.IsTrue(data.Exception.HasValue); Assert.IsTrue(data.Assembly.HasValue); Assert.AreEqual("System.Exception", data.Exception); Assert.AreEqual("VSOutputEnhancerDemo.exe", data.Assembly); Assert.AreEqual(new Span(19, 16), data.Exception.Span); Assert.AreEqual(new Span(40, 24), data.Assembly.Span); }
public void ExceptionVS2013() { const String messageString = "A first chance exception of type 'System.Exception' occurred in ConsoleDemo.exe\r\n"; var span = Utils.CreateSpan(messageString); var parser = new DebugExceptionParser(); DebugExceptionData data; var parsed = parser.TryParse(span, out data); Assert.IsTrue(parsed); Assert.IsNotNull(data); Assert.IsTrue(data.Exception.HasValue); Assert.IsTrue(data.Assembly.HasValue); Assert.AreEqual("System.Exception", data.Exception); Assert.AreEqual("ConsoleDemo.exe", data.Assembly); Assert.AreEqual(new Span(34, 16), data.Exception.Span); Assert.AreEqual(new Span(64, 15), data.Assembly.Span); }
public void Exception() { const String messageString = "Exception thrown: 'System.Exception' in VSOutputEnhancerDemo.exe\r\n"; var span = Utils.CreateSpan(messageString); var parser = new DebugExceptionParser(); DebugExceptionData data; var parsed = parser.TryParse(span, out data); Assert.IsTrue(parsed); Assert.IsNotNull(data); Assert.IsTrue(data.Exception.HasValue); Assert.IsTrue(data.Assembly.HasValue); Assert.AreEqual("System.Exception", data.Exception); Assert.AreEqual("VSOutputEnhancerDemo.exe", data.Assembly); Assert.AreEqual(new Span(19, 16), data.Exception.Span); Assert.AreEqual(new Span(40, 24), data.Assembly.Span); }