public void DevModeModuleValidateValueNotOverridden()
        {
            TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = true;
            DeveloperModeWithDebuggerAttachedTelemetryModule module = new DeveloperModeWithDebuggerAttachedTelemetryModule();
            module.Initialize(TelemetryConfiguration.Active);
            Assert.AreEqual(true, TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode);

            TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = false;
            module.Initialize(TelemetryConfiguration.Active);
            Assert.AreEqual(false, TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode);
        }
        public void DevModeModuleValidateValueNotOverridden()
        {
            TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = true;
            DeveloperModeWithDebuggerAttachedTelemetryModule module = new DeveloperModeWithDebuggerAttachedTelemetryModule();

            module.Initialize(TelemetryConfiguration.Active);
            Assert.AreEqual(true, TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode);

            TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = false;
            module.Initialize(TelemetryConfiguration.Active);
            Assert.AreEqual(false, TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode);
        }
        public void DevModeModuleValidateValueNotOverridden()
        {
            var telemetryConfiguration = TelemetryConfiguration.CreateDefault();

            telemetryConfiguration.TelemetryChannel.DeveloperMode = true;
            DeveloperModeWithDebuggerAttachedTelemetryModule module = new DeveloperModeWithDebuggerAttachedTelemetryModule();

            module.Initialize(telemetryConfiguration);
            Assert.AreEqual(true, telemetryConfiguration.TelemetryChannel.DeveloperMode);

            telemetryConfiguration.TelemetryChannel.DeveloperMode = false;
            module.Initialize(telemetryConfiguration);
            Assert.AreEqual(false, telemetryConfiguration.TelemetryChannel.DeveloperMode);
        }
        public void DevModeModuleValidateValueSetToDebuggerAttachedValueWhenNull()
        {
            TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = null;

            DeveloperModeWithDebuggerAttachedTelemetryModule.IsDebuggerAttached = () => true;
            DeveloperModeWithDebuggerAttachedTelemetryModule module = new DeveloperModeWithDebuggerAttachedTelemetryModule();
            module.Initialize(TelemetryConfiguration.Active);
            Assert.AreEqual(true, TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode);

            TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = null;
            DeveloperModeWithDebuggerAttachedTelemetryModule.IsDebuggerAttached = () => false;
            module = new DeveloperModeWithDebuggerAttachedTelemetryModule();
            module.Initialize(TelemetryConfiguration.Active);
            
            Assert.AreEqual(null, TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode);
        }
        public void DevModeModuleValidateValueSetToDebuggerAttachedValueWhenNull()
        {
            TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = null;

            DeveloperModeWithDebuggerAttachedTelemetryModule.IsDebuggerAttached = () => true;
            DeveloperModeWithDebuggerAttachedTelemetryModule module = new DeveloperModeWithDebuggerAttachedTelemetryModule();

            module.Initialize(TelemetryConfiguration.Active);
            Assert.AreEqual(true, TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode);

            TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode        = null;
            DeveloperModeWithDebuggerAttachedTelemetryModule.IsDebuggerAttached = () => false;
            module = new DeveloperModeWithDebuggerAttachedTelemetryModule();
            module.Initialize(TelemetryConfiguration.Active);

            Assert.AreEqual(null, TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode);
        }
        public void DevModeModuleValidateValueSetToDebuggerAttachedValueWhenNull()
        {
            var telemetryConfiguration = TelemetryConfiguration.CreateDefault();

            telemetryConfiguration.TelemetryChannel.DeveloperMode = null;

            DeveloperModeWithDebuggerAttachedTelemetryModule.IsDebuggerAttached = () => true;
            DeveloperModeWithDebuggerAttachedTelemetryModule module = new DeveloperModeWithDebuggerAttachedTelemetryModule();

            module.Initialize(telemetryConfiguration);
            Assert.AreEqual(true, telemetryConfiguration.TelemetryChannel.DeveloperMode);

            telemetryConfiguration.TelemetryChannel.DeveloperMode = null;
            DeveloperModeWithDebuggerAttachedTelemetryModule.IsDebuggerAttached = () => false;
            module = new DeveloperModeWithDebuggerAttachedTelemetryModule();
            module.Initialize(telemetryConfiguration);

            Assert.AreEqual(null, telemetryConfiguration.TelemetryChannel.DeveloperMode);
        }