Beispiel #1
0
        public void InitializeDoesNotThrowIfVersionDoesNotExist()
        {
            var initializer = new ComponentVersionTelemetryInitializer(this.BuildConfigurationWithVersion(null));
            var telemetry   = new RequestTelemetry();

            initializer.Initialize(telemetry);
        }
Beispiel #2
0
        public void InitializeAssignsVersionToTelemetry()
        {
            var initializer = new ComponentVersionTelemetryInitializer(this.BuildConfigurationWithVersion());
            var telemetry   = new RequestTelemetry();

            initializer.Initialize(telemetry);
            Assert.NotNull(telemetry.Context.Component.Version);
        }
Beispiel #3
0
        public void InitializeDoesNotThrowIfVersionDoesNotExist()
        {
            var config = new ConfigurationBuilder()
                         .Build();
            var initializer = new ComponentVersionTelemetryInitializer(config);
            var telemetry   = new RequestTelemetry();

            initializer.Initialize(telemetry);
        }
Beispiel #4
0
        public void InitializeDoesNotOverrideExistingVersion()
        {
            var initializer = new ComponentVersionTelemetryInitializer(this.BuildConfigurationWithVersion());
            var telemetry   = new RequestTelemetry();

            telemetry.Context.Component.Version = "TestVersion";
            initializer.Initialize(telemetry);

            Assert.Equal("TestVersion", telemetry.Context.Component.Version);
        }
Beispiel #5
0
        public void InitializeDoesNotThrowIfRequestTelemetryIsUnavailable()
        {
            var initializer = new ComponentVersionTelemetryInitializer(this.BuildConfigurationWithVersion());

            initializer.Initialize(new RequestTelemetry());
        }