public void AssertAllMembersCalled() { if (_expectedApiCalls != _calledMembers) { for (IListApi i = (IListApi)1; i < IListApi.End; i = (IListApi)((int)i << 1)) { Assert.Equal(_expectedApiCalls & i, _calledMembers & i); } } }
public T this[int index] { get { _calledMembers |= IListApi.IndexerGet; return(default(T)); } set { _calledMembers |= IListApi.IndexerSet; } }
public void AssertAllMembersCalled() { if (_expectedApiCalls != _calledMembers) { for (IListApi i = (IListApi)1; i < IListApi.End; i = (IListApi)((int)i << 1)) { if ((_expectedApiCalls & i) == i && (_calledMembers & i) != i) { Assert.True(false, string.Format("Expected IList API '{0}' to be called", i.ToString())); } } } }
public bool Contains(T item) { _calledMembers |= IListApi.Contains; return(false); }
public void Clear() { _calledMembers |= IListApi.Clear; }
public CallTrackingIList(IListApi expectedApiCalls) { _expectedApiCalls = expectedApiCalls; }
IEnumerator IEnumerable.GetEnumerator() { _calledMembers |= IListApi.GetEnumerator; return(null); }
public void RemoveAt(int index) { _calledMembers |= IListApi.RemoveAt; }
public void Insert(int index, T item) { _calledMembers |= IListApi.Insert; }
public int IndexOf(T item) { _calledMembers |= IListApi.IndexOf; return(-1); }
public IEnumerator <T> GetEnumerator() { _calledMembers |= IListApi.GetEnumeratorGeneric; return(null); }
public void CopyTo(T[] array, int arrayIndex) { _calledMembers |= IListApi.CopyTo; }