public void LoadFromXmlInitializesGivenTelemetryConfigurationInstanceFromXml() { string expected = Guid.NewGuid().ToString(); string profile = Configuration("<InstrumentationKey>" + expected + "</InstrumentationKey>"); var configuration = new TelemetryConfiguration(); TestableTelemetryConfigurationFactory.LoadFromXml(configuration, XDocument.Parse(profile)); // Assume LoadFromXml calls LoadInstance, which is tested separately. Assert.Equal(expected, configuration.InstrumentationKey); }