Fixed unit tests that were failing due to the introdcution of the ItemReplaced event; removed NotifyCollectionResetEventArgs if no specialized collections are available
git-svn-id: file:///srv/devel/repo-conversion/nusu@257 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
2d04ad7b49
commit
13579c5162
3 changed files with 26 additions and 6 deletions
|
|
@ -57,6 +57,11 @@ namespace Nuclex.Support.Collections {
|
|||
/// <param name="arguments">Contains the item that is being removed</param>
|
||||
void ItemRemoved(object sender, ItemEventArgs<int> arguments);
|
||||
|
||||
/// <summary>Called when an item is replaced in the dictionary</summary>
|
||||
/// <param name="sender">Dictionary in which an item is being replaced</param>
|
||||
/// <param name="arguments">Contains the replaced item and its replacement</param>
|
||||
void ItemReplaced(object sender, ItemReplaceEventArgs<int> arguments);
|
||||
|
||||
}
|
||||
|
||||
#endregion // interface IObservableCollectionSubscriber
|
||||
|
|
@ -81,6 +86,9 @@ namespace Nuclex.Support.Collections {
|
|||
this.observedList.ItemRemoved += new EventHandler<ItemEventArgs<int>>(
|
||||
this.mockedSubscriber.MockObject.ItemRemoved
|
||||
);
|
||||
this.observedList.ItemReplaced += new EventHandler<ItemReplaceEventArgs<int>>(
|
||||
this.mockedSubscriber.MockObject.ItemReplaced
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>Tests whether the Clearing event is fired</summary>
|
||||
|
|
@ -128,8 +136,7 @@ namespace Nuclex.Support.Collections {
|
|||
this.observedList.Add(2);
|
||||
this.observedList.Add(3);
|
||||
|
||||
this.mockedSubscriber.Expects.One.Method(m => m.ItemRemoved(null, null)).WithAnyArguments();
|
||||
this.mockedSubscriber.Expects.One.Method(m => m.ItemAdded(null, null)).WithAnyArguments();
|
||||
this.mockedSubscriber.Expects.One.Method(m => m.ItemReplaced(null, null)).WithAnyArguments();
|
||||
|
||||
// Replace the middle item with something else
|
||||
this.observedList[1] = 4;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue