public void ListViewSubItemCollection_IndexOf_Empty_ReturnsFalse() { var item = new ListViewItem(); var collection = new ListViewItem.ListViewSubItemCollection(item); Assert.Equal(-1, collection.IndexOf(new ListViewItem.ListViewSubItem())); Assert.Equal(-1, collection.IndexOf(null)); }
public void ListViewSubItemCollection_IListIndexOf_Empty_ReturnsMinusOne() { var item = new ListViewItem(); IList collection = new ListViewItem.ListViewSubItemCollection(item); Assert.Equal(-1, collection.IndexOf(new ListViewItem.ListViewSubItem())); Assert.Equal(-1, collection.IndexOf(new object())); Assert.Equal(-1, collection.IndexOf(null)); }
public void ListViewSubItemCollection_IndexOf_Invoke_ReturnsExpected() { var item = new ListViewItem(); var collection = new ListViewItem.ListViewSubItemCollection(item); var subItem = new ListViewItem.ListViewSubItem(); collection.Add(subItem); Assert.Equal(0, collection.IndexOf(subItem)); Assert.Equal(-1, collection.IndexOf(new ListViewItem.ListViewSubItem())); Assert.Equal(-1, collection.IndexOf(null)); }