Ejemplo n.º 1
0
        public void WebView2Debugging_OnGetPropertyValueAsync_GetsDefaultValueWhenNotDefined()
        {
            var profile = new WritableLaunchProfile().ToLaunchProfile();

            var provider = new ProjectLaunchProfileExtensionValueProvider();

            var actualValue = provider.OnGetPropertyValue(ProjectLaunchProfileExtensionValueProvider.WebView2DebuggingPropertyName, profile, EmptyGlobalSettings, rule: null);

            Assert.Equal(expected: "false", actual: actualValue);
        }
Ejemplo n.º 2
0
        public void RemoteDebugEnabled_OnGetPropertyValueAsync_GetsRemoteDebuggingFromActiveProfile()
        {
            bool activeProfileRemoteDebugEnabled = true;
            var  profile = new WritableLaunchProfile
            {
                OtherSettings =
                {
                    { LaunchProfileExtensions.RemoteDebugEnabledProperty, activeProfileRemoteDebugEnabled }
                }
            }.ToLaunchProfile();

            var provider = new ProjectLaunchProfileExtensionValueProvider();

            var actualValue = provider.OnGetPropertyValue(ProjectLaunchProfileExtensionValueProvider.RemoteDebugEnabledPropertyName, profile, EmptyGlobalSettings, rule: null);

            Assert.Equal(expected: "true", actual: actualValue);
        }
Ejemplo n.º 3
0
        public void NativeDebugging_OnSetPropertyValueAsync_SetsNativeDebuggingInActiveProfile()
        {
            bool activeProfileNativeDebugging = false;
            var  profile = new WritableLaunchProfile
            {
                OtherSettings =
                {
                    { LaunchProfileExtensions.NativeDebuggingProperty, activeProfileNativeDebugging }
                }
            };

            var provider = new ProjectLaunchProfileExtensionValueProvider();

            provider.OnSetPropertyValue(ProjectLaunchProfileExtensionValueProvider.NativeDebuggingPropertyName, "true", profile, EmptyGlobalSettings, rule: null);

            Assert.True((bool)profile.OtherSettings[LaunchProfileExtensions.NativeDebuggingProperty]);
        }
Ejemplo n.º 4
0
        public void AuthenticationMode_OnSetPropertyValueAsync_SetsModeInActiveProfile()
        {
            string activeProfileAuthenticationMode = "Windows";
            var    profile = new WritableLaunchProfile
            {
                OtherSettings =
                {
                    { LaunchProfileExtensions.RemoteAuthenticationModeProperty, activeProfileAuthenticationMode }
                }
            };

            var provider = new ProjectLaunchProfileExtensionValueProvider();

            provider.OnSetPropertyValue(ProjectLaunchProfileExtensionValueProvider.AuthenticationModePropertyName, "NotWindows", profile, EmptyGlobalSettings, rule: null);

            Assert.Equal(expected: "NotWindows", actual: profile.OtherSettings[LaunchProfileExtensions.RemoteAuthenticationModeProperty]);
        }
Ejemplo n.º 5
0
        public void WebView2Debugging_OnSetPropertyValueAsync_SetsWebView2DebuggingToSpecifiedValue()
        {
            bool webView2Debugging = false;
            var  profile           = new WritableLaunchProfile
            {
                OtherSettings =
                {
                    { LaunchProfileExtensions.JSWebView2DebuggingProperty, webView2Debugging }
                }
            };

            var provider = new ProjectLaunchProfileExtensionValueProvider();

            provider.OnSetPropertyValue(ProjectLaunchProfileExtensionValueProvider.WebView2DebuggingPropertyName, "true", profile, EmptyGlobalSettings, rule: null);

            Assert.True((bool)profile.OtherSettings[LaunchProfileExtensions.JSWebView2DebuggingProperty]);
        }
Ejemplo n.º 6
0
        public void WebView2Debugging_OnGetPropertyValueAsync_GetsValueInProfileWhenDefined()
        {
            bool webView2Debugging = true;
            var  profile           = new WritableLaunchProfile
            {
                OtherSettings =
                {
                    { LaunchProfileExtensions.JSWebView2DebuggingProperty, webView2Debugging }
                }
            }.ToLaunchProfile();

            var provider = new ProjectLaunchProfileExtensionValueProvider();

            var actualValue = provider.OnGetPropertyValue(ProjectLaunchProfileExtensionValueProvider.WebView2DebuggingPropertyName, profile, EmptyGlobalSettings, rule: null);

            Assert.Equal(expected: "true", actual: actualValue);
        }
Ejemplo n.º 7
0
        public void HotReloadEnabled_OnSetPropertyValueAsync_SetsHotReloadToSpecifiedValue()
        {
            bool hotReloadEnabled = true;
            var  profile          = new WritableLaunchProfile
            {
                OtherSettings =
                {
                    { LaunchProfileExtensions.HotReloadEnabledProperty, hotReloadEnabled }
                }
            };

            var provider = new ProjectLaunchProfileExtensionValueProvider();

            provider.OnSetPropertyValue(ProjectLaunchProfileExtensionValueProvider.HotReloadEnabledPropertyName, "false", profile, EmptyGlobalSettings, rule: null);

            Assert.False((bool)profile.OtherSettings[LaunchProfileExtensions.HotReloadEnabledProperty]);
        }
Ejemplo n.º 8
0
        public void HotReloadEnabled_OnGetPropertyValueAsync_GetsValueInProfileWhenDefined()
        {
            bool hotReloadEnabled = false;
            var  profile          = new WritableLaunchProfile
            {
                OtherSettings =
                {
                    { LaunchProfileExtensions.HotReloadEnabledProperty, hotReloadEnabled }
                }
            }.ToLaunchProfile();

            var provider = new ProjectLaunchProfileExtensionValueProvider();

            var actualValue = provider.OnGetPropertyValue(ProjectLaunchProfileExtensionValueProvider.HotReloadEnabledPropertyName, profile, EmptyGlobalSettings, rule: null);

            Assert.Equal(expected: "false", actual: actualValue);
        }
Ejemplo n.º 9
0
        public void RemoteMachineName_OnSetPropertyValueAsync_SetsNameInActiveProfile()
        {
            string activeProfileRemoteMachineName = "Tiger";
            var    profile = new WritableLaunchProfile
            {
                OtherSettings =
                {
                    { LaunchProfileExtensions.RemoteDebugMachineProperty, activeProfileRemoteMachineName }
                }
            };

            var provider = new ProjectLaunchProfileExtensionValueProvider();

            provider.OnSetPropertyValue(ProjectLaunchProfileExtensionValueProvider.RemoteDebugMachinePropertyName, "Cheetah", profile, EmptyGlobalSettings, rule: null);

            Assert.Equal(expected: "Cheetah", actual: profile.OtherSettings[LaunchProfileExtensions.RemoteDebugMachineProperty]);
        }
Ejemplo n.º 10
0
        public void RemoteMachineName_OnGetPropertyValueAsync_GetsNameFromActiveProfile()
        {
            string activeProfileRemoteMachineName = "alphaMachine";
            var    profile = new WritableLaunchProfile
            {
                OtherSettings =
                {
                    { LaunchProfileExtensions.RemoteDebugMachineProperty, activeProfileRemoteMachineName }
                }
            }.ToLaunchProfile();

            var provider = new ProjectLaunchProfileExtensionValueProvider();

            var actualValue = provider.OnGetPropertyValue(ProjectLaunchProfileExtensionValueProvider.RemoteDebugMachinePropertyName, profile, EmptyGlobalSettings, rule: null);

            Assert.Equal(expected: activeProfileRemoteMachineName, actual: actualValue);
        }
Ejemplo n.º 11
0
        public void AuthenticationMode_OnGetPropertyValueAsync_GetsModeFromActiveProfile()
        {
            string activeProfileAuthenticationMode = "Windows";
            var    profile = new WritableLaunchProfile
            {
                OtherSettings =
                {
                    { LaunchProfileExtensions.RemoteAuthenticationModeProperty, activeProfileAuthenticationMode }
                }
            }.ToLaunchProfile();

            var provider = new ProjectLaunchProfileExtensionValueProvider();

            var actualValue = provider.OnGetPropertyValue(ProjectLaunchProfileExtensionValueProvider.AuthenticationModePropertyName, profile, EmptyGlobalSettings, rule: null);

            Assert.Equal(expected: activeProfileAuthenticationMode, actual: actualValue);
        }