public void BoolSettingDefinition_ConvertFromString_PerformsValidConversions() { var definition = new BoolSettingDefinition("test", "desc", false); Assert.False(definition.ConvertFromString("false")); Assert.False(definition.ConvertFromString("FALSE")); Assert.True(definition.ConvertFromString("true")); Assert.True(definition.ConvertFromString("TRUE")); }
public void BoolSettingDefinition_ConvertFromString_RaisesFormatException() { var definition = new BoolSettingDefinition("test", "desc", false); Assert.Throws <FormatException>(() => definition.ConvertFromString("no")); }