public async Task SetValue(string incomingValue, string expectedOutputTypeValue) { var setValues = new List <object>(); var properties = ProjectPropertiesFactory.Create( UnconfiguredProjectFactory.Create(), new PropertyPageData(ConfigurationGeneral.SchemaName, ConfigurationGeneral.OutputTypeProperty, "InitialValue", setValues)); var provider = new OutputTypeExValueProvider(properties); await provider.OnSetPropertyValueAsync(string.Empty, incomingValue, null !); Assert.Equal(setValues.Single(), expectedOutputTypeValue); }
public async Task SetValue_ThrowsKeyNotFoundException() { var setValues = new List <object>(); var properties = ProjectPropertiesFactory.Create( UnconfiguredProjectFactory.Create(), new PropertyPageData(ConfigurationGeneral.SchemaName, ConfigurationGeneral.OutputTypeProperty, "InitialValue", setValues)); var provider = new OutputTypeExValueProvider(properties); await Assert.ThrowsAsync <KeyNotFoundException>(async() => { await provider.OnSetPropertyValueAsync(string.Empty, "InvalidValue", null !); }); }