public void Setup() { path = "myfile.test.txt"; rnd = new Random(); tracer = new ITracerImplementation(); tempTxt = "This is my string! there are many like this but this is mine!..."; if (File.Exists(path)) { File.Delete(path); } tr1 = new TraceRecord(Thread.CurrentThread, "method1.method2", tempTxt.GetType()); tr2 = new TraceRecord(Thread.CurrentThread, "method1.method2.method3", rnd.GetType()); st1 = System.Diagnostics.Stopwatch.StartNew(); st2 = System.Diagnostics.Stopwatch.StartNew(); Thread.Sleep(rnd.Next(1, 100)); st1.Stop(); Thread.Sleep(rnd.Next(1, 100)); st2.Stop(); tr1.addValue(st1); tr1.addValue(st2); }
public void TraceRecordCounterTest() { tr1.addValue(st1); Assert.AreEqual(3, tr1.count); // Assert.Fail("WIP"); }