public Initialize ( ITelemetry telemetry ) : void | ||
telemetry | ITelemetry | |
return | void |
public void InitializeSetsTimestampPropertyOfGivenTelemetry() { var initializer = new TimestampPropertyInitializer(); var telemetry = new StubTelemetry(); initializer.Initialize(telemetry); Assert.True(DateTimeOffset.Now.Subtract(telemetry.Timestamp) < TimeSpan.FromMinutes(1)); }
public void InitializeSetsTimestampPropertyOfGivenTelemetry() { var initializer = new TimestampPropertyInitializer(); var telemetry = new StubTelemetry(); initializer.Initialize(telemetry); Assert.True(DateTimeOffset.Now.Subtract(telemetry.Timestamp) < TimeSpan.FromMinutes(1)); }
public void InitializeDoesNotOverrideTimestampSpecifiedExplicitly() { var initializer = new TimestampPropertyInitializer(); var expected = new DateTimeOffset(new DateTime(42)); var telemetry = new StubTelemetry { Timestamp = expected }; initializer.Initialize(telemetry); Assert.Equal(expected, telemetry.Timestamp); }
public void InitializeDoesNotOverrideTimestampSpecifiedExplicitly() { var initializer = new TimestampPropertyInitializer(); var expected = new DateTimeOffset(new DateTime(42)); var telemetry = new StubTelemetry { Timestamp = expected }; initializer.Initialize(telemetry); Assert.Equal(expected, telemetry.Timestamp); }