static public void Test(Tracer tracer) { tracer.StartTrace(); TestEZ.Test(tracer); RecursionTest.Test(1, tracer); tracer.StopTrace(); }
static public void Test(Tracer tracer) { tracer.StartTrace(); tracer = null; TestEZ.Test(tracer); tracer.StopTrace(); }
static public void InsertTestMethod(Tracer tracer) { tracer.StartTrace(); TestEZ.Test(tracer); Thread.Sleep(10); tracer.StopTrace(); }
static public void Test(int i, Tracer tracer) { tracer.StartTrace(); i++; TestEZ.Test(tracer); if (i < 2) { Test(i, tracer); } tracer.StopTrace(); }
public void TestRowMethod() { TestEZ.Test(tracer); TestEZ.Test(tracer); TestEZ.Test(tracer); var actual = tracer.GetTraceResult().Theards[Thread.CurrentThread.ManagedThreadId].Methods.Count; var expected = new MethodTraceResult(); expected.Methods.Add(new MethodTraceResult()); expected.Methods.Add(new MethodTraceResult()); expected.Methods.Add(new MethodTraceResult()); try { Assert.AreEqual(expected.Methods.Count, actual); logger.Info(nameof(TestRowMethod) + " - passed"); } catch (Exception e) { logger.Error(e, nameof(TestRowMethod) + " - failed"); } }
public void TestEZMethod() { TestEZ.Test(tracer); var actual = tracer.GetTraceResult().Theards[Thread.CurrentThread.ManagedThreadId].Methods[0]; var expected = new MethodTraceResult(); expected.MethodName = "Test"; expected.MethodClassName = "TestEZ"; try { Assert.AreEqual(expected.MethodClassName, actual.MethodClassName); Assert.AreEqual(expected.MethodName, actual.MethodName); Assert.AreEqual(expected.Methods.Count, actual.Methods.Count); Assert.IsNotNull(actual.MethodExecuteTime); logger.Info(nameof(TestEZMethod) + " - passed"); } catch (Exception e) { logger.Error(e, nameof(TestEZMethod) + " - failed"); } }