public void IList_Generic_IndexOf_DefaultValueNotContainedInList(int count) { if (DefaultValueAllowed) { SCG.IList <T> list = GenericIListFactory(count); T value = default(T); if (list.Contains(value)) { if (IsReadOnly) { return; } list.Remove(value); } Assert.Equal(-1, list.IndexOf(value)); } else { SCG.IList <T> list = GenericIListFactory(count); Assert.Throws <ArgumentNullException>(() => list.IndexOf(default(T))); } }