예제 #1
0
        public void InitializeInstrumentationKeySetsTelemetryInstrumentationKey()
        {
            var sourceInstrumentationKey = "TestValue";
            var target = new TelemetryContext();

            target.InitializeInstrumentationkey(sourceInstrumentationKey);

            Assert.AreEqual("TestValue", target.InstrumentationKey);
        }
예제 #2
0
        public void InitializeInstrumentationKeyDoesNotOverrideTelemetryInstrumentationKey()
        {
            var sourceInstrumentationKey = "SourceValue";
            var target = new TelemetryContext {
                InstrumentationKey = "TargetValue"
            };

            target.InitializeInstrumentationkey(sourceInstrumentationKey);

            Assert.AreEqual("TargetValue", target.InstrumentationKey);
        }