示例#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);
        }
示例#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);
        }
示例#3
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);
        }
示例#4
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);
        }
示例#5
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);
        }
示例#6
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);
        }