public void ListViewSubItemCollection_ContainsKey_Empty_ReturnsFalse() { var item = new ListViewItem(); var collection = new ListViewItem.ListViewSubItemCollection(item); Assert.False(collection.ContainsKey("text")); Assert.False(collection.ContainsKey(null)); }
public void ListViewSubItemCollection_ContainsKey_Invoke_ReturnsExpected(string key, bool expected) { var item = new ListViewItem(); var collection = new ListViewItem.ListViewSubItemCollection(item); var subItem1 = new ListViewItem.ListViewSubItem(); var subItem2 = new ListViewItem.ListViewSubItem(); subItem2.Name = "text"; collection.Add(subItem1); collection.Add(subItem2); Assert.Equal(expected, collection.ContainsKey(key)); }