Ejemplo n.º 1
0
        public void RaygunStringTraceHasTagsAssignedViaMethodAndClassAttributes()
        {
            var context = _listener.MessageFromString("nunit test RaygunHasTagsAssignedViaMethodAndClassAttributes", "string exception", TraceEventType.Error);

            Assert.That(context, Is.Not.Null);
            Assert.That(context.Tags, Is.Not.Null);
            Assert.That(context.Tags.ToArray(), Has.Length.EqualTo(4));
            Assert.That(context.Tags, Has.Exactly(1).Contains("trace-method"));
            Assert.That(context.Tags, Has.Exactly(1).Contains("string-method"));
            Assert.That(context.Tags, Has.Exactly(1).Contains("trace-class"));
            Assert.That(context.Tags, Has.Exactly(1).Contains("string-class"));
        }
Ejemplo n.º 2
0
        public void RaygunExceptionMessageShouldMirrorTraceErrorMessage()
        {
            var listener = new RaygunTraceListener();
            var context  = listener.MessageFromString("nunit test RaygunExceptionMessageShouldMirrorTraceErrorMessage", "string exception", TraceEventType.Error);

            Assert.That(context, Is.Not.Null);
            Assert.That(context.Exception, Is.Not.Null);
            Assert.That(context.Exception.Message, Does.Contain("nunit test RaygunExceptionMessageShouldMirrorTraceErrorMessage"));
            Assert.That(context.Exception.Message, Does.Contain("string exception"));
        }