public async Task GetProperty_ReturnsEmptyString_WhenActiveLaunchProfileHasNoCommand()
        {
            var provider = new LaunchTargetPropertyPageValueProvider(
                project: UnconfiguredProjectFactory.Create(),
                launchSettingsProvider: SetupLaunchSettingsProvider(activeProfileName: "Alpha"),
                projectThreadingService: IProjectThreadingServiceFactory.Create());

            var actualValue = await provider.OnGetEvaluatedPropertyValueAsync(string.Empty, string.Empty, Mock.Of <IProjectProperties>());

            Assert.Equal(expected: string.Empty, actual: actualValue);
        }
        public async Task GetProperty_ReturnsEmptyString_WhenThereIsNoPropertyPagesCatalog()
        {
            var provider = new LaunchTargetPropertyPageValueProvider(
                project: UnconfiguredProjectFactory.Create(
                    configuredProject: ConfiguredProjectFactory.Create(
                        services: ConfiguredProjectServicesFactory.Create(
                            propertyPagesCatalogProvider: null))),
                launchSettingsProvider: SetupLaunchSettingsProvider(activeProfileName: "Alpha", activeProfileLaunchTarget: "AlphaCommand"),
                projectThreadingService: IProjectThreadingServiceFactory.Create());

            var actualValue = await provider.OnGetEvaluatedPropertyValueAsync(string.Empty, Mock.Of <IProjectProperties>());

            Assert.Equal(expected: string.Empty, actual: actualValue);
        }
        public async Task GetProperty_DoesNotFail_WhenAPageHasNoTemplate()
        {
            var catalogProvider = GetCatalogAndProviderDataWithMissingTemplateName();

            var provider = new LaunchTargetPropertyPageValueProvider(
                project: UnconfiguredProjectFactory.Create(
                    configuredProject: ConfiguredProjectFactory.Create(
                        services: ConfiguredProjectServicesFactory.Create(
                            propertyPagesCatalogProvider: catalogProvider))),
                launchSettingsProvider: SetupLaunchSettingsProvider(activeProfileName: "Alpha", activeProfileLaunchTarget: "BetaCommand"),
                projectThreadingService: IProjectThreadingServiceFactory.Create());

            var actualValue = await provider.OnGetEvaluatedPropertyValueAsync(string.Empty, string.Empty, Mock.Of <IProjectProperties>());

            Assert.Equal(expected: string.Empty, actual: actualValue);
        }
        public async Task SetProperty_DoesNothing_WhenThereIsNoPropertyPagesCatalog()
        {
            bool launchSettingsUpdated = false;

            var provider = new LaunchTargetPropertyPageValueProvider(
                project: UnconfiguredProjectFactory.Create(
                    configuredProject: ConfiguredProjectFactory.Create(
                        services: ConfiguredProjectServicesFactory.Create(
                            propertyPagesCatalogProvider: null))),
                launchSettingsProvider: SetupLaunchSettingsProvider(
                    activeProfileName: "Alpha",
                    activeProfileLaunchTarget: "AlphaCommand",
                    updateLaunchSettingsCallback: ls => launchSettingsUpdated = true),
                projectThreadingService: IProjectThreadingServiceFactory.Create());

            var actualValue = await provider.OnSetPropertyValueAsync(string.Empty, "BetaPage", Mock.Of <IProjectProperties>());

            Assert.Null(actualValue);
            Assert.False(launchSettingsUpdated);
        }