public void RemoveValueForUnknownValueDoesNotThrow() { var dictionary = new Xunit.Sdk.MultiValueDictionary <string, string>(); dictionary.AddValue("Key", "Value1"); Assert.DoesNotThrow(() => dictionary.RemoveValue("Key", "Value2")); }
public void RemovingLastValueFromKeyRemovesKey() { var dictionary = new Xunit.Sdk.MultiValueDictionary <string, string>(); dictionary.AddValue("Key", "Value1"); dictionary.RemoveValue("Key", "Value1"); Assert.DoesNotContain("Key", dictionary.Keys); }
public void RemoveValue() { var dictionary = new Xunit.Sdk.MultiValueDictionary <string, string>(); dictionary.AddValue("Key", "Value1"); dictionary.AddValue("Key", "Value2"); dictionary.RemoveValue("Key", "Value1"); Assert.Contains("Key", dictionary.Keys); IEnumerable <string> values = dictionary["Key"]; Assert.DoesNotContain("Value1", values); Assert.Contains("Value2", values); }
public void RemoveValueForUnknownKeyDoesNotThrow() { var dictionary = new Xunit.Sdk.MultiValueDictionary<string, string>(); Assert.DoesNotThrow(() => dictionary.RemoveValue("Key", "Value1")); }
public void RemoveValue() { var dictionary = new Xunit.Sdk.MultiValueDictionary<string, string>(); dictionary.AddValue("Key", "Value1"); dictionary.AddValue("Key", "Value2"); dictionary.RemoveValue("Key", "Value1"); Assert.Contains("Key", dictionary.Keys); IEnumerable<string> values = dictionary["Key"]; Assert.DoesNotContain("Value1", values); Assert.Contains("Value2", values); }
public void RemovingLastValueFromKeyRemovesKey() { var dictionary = new Xunit.Sdk.MultiValueDictionary<string, string>(); dictionary.AddValue("Key", "Value1"); dictionary.RemoveValue("Key", "Value1"); Assert.DoesNotContain("Key", dictionary.Keys); }