public void SnapshotProbeDouble_CanBeCreated() { Test.Begin("SnapshotProbeDouble can be created"); double x = 5.1; var a = new Telemetry.CustomProbeDouble(() => x); var s = new Telemetry.SnapshotProbeDouble(a); Test.IsTrue(s.Value == 0.0); Test.End(); }
public void SnapshotProbeDouble_Works() { Test.Begin("SnapshotProbeDouble works"); double x = 5.1; var a = new Telemetry.CustomProbeDouble(() => x); var s = new Telemetry.SnapshotProbeDouble(a); x = 6.1; Test.IsTrue(s.Value == 1.0); x = 10.1; Test.IsTrue(s.Value == 5.0); x = 0.0; Test.IsTrue(s.Value == -5.1); Test.End(); }