public void WhenRetrievingItemProperties_NullIsReturnedIfTheItemIsNull() { var project = UnconfiguredProjectFactory.Create(); var provider = new LaunchProfileProjectPropertiesProvider( project, ILaunchSettingsProviderFactory.Create(), EmptyLaunchProfileExtensionValueProviders, EmptyGlobalSettingExtensionValueProviders); var itemProperties = provider.GetItemProperties(LaunchProfileProjectItemProvider.ItemType, item: null); Assert.Null(itemProperties); }
public void WhenRetrievingItemProperties_PropertiesAreReturnedIfTheItemTypeIsNull() { var provider = new LaunchProfileProjectPropertiesProvider( UnconfiguredProjectFactory.Create(), CreateDefaultTestLaunchSettings(), EmptyLaunchProfileExtensionValueProviders, EmptyGlobalSettingExtensionValueProviders); var properties = provider.GetItemProperties( itemType: null, item: "Profile1"); Assert.NotNull(properties); }
public void WhenRetrievingItemProperties_NullIsReturnedIfTheItemTypeDoesNotMatch() { var profile1 = new WritableLaunchProfile { Name = "Profile1" }; var profile2 = new WritableLaunchProfile { Name = "Profile2" }; var launchSettingsProvider = ILaunchSettingsProviderFactory.Create( launchProfiles: new[] { profile1.ToLaunchProfile(), profile2.ToLaunchProfile() }); var provider = new LaunchProfileProjectPropertiesProvider( UnconfiguredProjectFactory.Create(), launchSettingsProvider, EmptyLaunchProfileExtensionValueProviders, EmptyGlobalSettingExtensionValueProviders); var properties = provider.GetItemProperties( itemType: "RandomItemType", item: "Profile1"); Assert.Null(properties); }