public void InitializeSetsSdkVersionPropertyOfGivenTelemetry()
        {
            var initializer = new SdkVersionPropertyTelemetryInitializer();
            var item = new RequestTelemetry();
            initializer.Initialize(item);

            Assert.NotNull(item.Context.Internal.SdkVersion);
        }
Exemplo n.º 2
0
        public void InitializeSetsSdkVersionPropertyOfGivenTelemetry()
        {
            var initializer = new SdkVersionPropertyTelemetryInitializer();
            var item        = new RequestTelemetry();

            initializer.Initialize(item);

            Assert.NotNull(item.Context.Internal.SdkVersion);
        }
 public void InitializeSetsSdkVersionValueAsAssemblyVersion()
 {
     var initializer = new SdkVersionPropertyTelemetryInitializer();
     var item = new RequestTelemetry();
     initializer.Initialize(item);
     
     string expectedSdkVersion = typeof(SdkVersionPropertyTelemetryInitializer).Assembly.GetCustomAttributes(false)
             .OfType<AssemblyFileVersionAttribute>()
             .First()
             .Version;
     Assert.Equal(item.Context.Internal.SdkVersion, expectedSdkVersion);
 }
Exemplo n.º 4
0
        public void InitializeSetsSdkVersionValueAsAssemblyVersion()
        {
            var initializer = new SdkVersionPropertyTelemetryInitializer();
            var item        = new RequestTelemetry();

            initializer.Initialize(item);

            string expectedSdkVersion = typeof(SdkVersionPropertyTelemetryInitializer).Assembly.GetCustomAttributes(false)
                                        .OfType <AssemblyFileVersionAttribute>()
                                        .First()
                                        .Version;

            Assert.Equal(item.Context.Internal.SdkVersion, expectedSdkVersion);
        }