public void Remove_should_remove_definition_from_collection() { _parser = new GitExtLinksParser(_repoLocal); var effectiveSettings = _parser.EffectiveLinkDefs; var definition = effectiveSettings[0]; // comes from the local _parser.RemoveLinkDef(definition); effectiveSettings = _parser.EffectiveLinkDefs; // 1 comes from the user roaming settings // 3 come from the distributed // 0 comes from the local effectiveSettings.Count.Should().Be(4); }
private void Remove_Click(object sender, EventArgs e) { if (SelectedCategory == null) { return; } int idx = _NO_TRANSLATE_Categories.SelectedIndex; parser.RemoveLinkDef(SelectedCategory); ReloadCategories(); if (idx >= 0) { _NO_TRANSLATE_Categories.SelectedIndex = Math.Min(idx, _NO_TRANSLATE_Categories.Items.Count - 1); } CategoryChanged(); }