public void SnapshotProbeLong_CanBeCreated() { Test.Begin("SnapshotProbeLong can be created"); var a = new Telemetry.Counter(); a.Set(100); var s = new Telemetry.SnapshotProbeLong(a); Test.IsTrue(s.Value == 0); Test.End(); }
public void SnapshotProbeLong_Works() { Test.Begin("SnapshotProbeLong works"); var a = new Telemetry.Counter(); a.Set(100); var s = new Telemetry.SnapshotProbeLong(a); a.Increment(); Test.IsTrue(s.Value == 1); a.Increment(); Test.IsTrue(s.Value == 2); a.Decrement(); Test.IsTrue(s.Value == 1); a.Decrement(2); Test.IsTrue(s.Value == -1); Test.End(); }