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

            Assert.NotNull(item.Context.Internal.SdkVersion);
        }
예제 #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);
 }
예제 #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);
        }