private void DoOtherThreadWork() { using (Tracer tracer = new Tracer(Context, testCategory1, testActivityId1)) { Assert.IsNotNull(tracer); Assert.AreEqual(testActivityId1, Tracer.CurrentActivityId); } }
public void LogMessageContainsProperMethodName() { using (Tracer tracer = new Tracer(Context, Tracer.defaultCategory, null)) { Assert.IsNotNull(tracer); } Assert.AreEqual(2, MockLogSink.Count); AssertStringContainsString(MockLogSink.GetEntry(0).Message, MethodInfo.GetCurrentMethod().Name); AssertStringContainsString(MockLogSink.GetEntry(1).Message, MethodInfo.GetCurrentMethod().Name); }
public void OmittingActivityIdDoesntOverwriteExistingActivityId() { using (Tracer tracer1 = new Tracer(Context, testCategory1, testActivityId1)) { Assert.IsNotNull(tracer1); using (Tracer tracer2 = new Tracer(Context, testCategory1, null)) { Assert.IsNotNull(tracer2); Assert.AreEqual(testActivityId1, Tracer.CurrentActivityId); } } }