SetProgression partially working; wrote several unit tests using the NMock library; lots of smaller improvements to the progression classes
git-svn-id: file:///srv/devel/repo-conversion/nusu@12 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
cefbc78868
commit
71b6dc90a2
8 changed files with 452 additions and 36 deletions
|
@ -49,35 +49,36 @@ namespace Nuclex.Support.Collections {
|
|||
new EventHandler<ObservableCollection<int>.ItemEventArgs>(
|
||||
this.mockedSubscriber.ItemRemoved
|
||||
);
|
||||
|
||||
this.mockery.VerifyAllExpectationsHaveBeenMet();
|
||||
}
|
||||
|
||||
/// <summary>Tests whether the Clearing event is fired</summary>
|
||||
[Test]
|
||||
public void TestClearingEvent() {
|
||||
|
||||
Expect.Once.On(this.mockedSubscriber).
|
||||
Method("Clearing");
|
||||
|
||||
this.observedCollection.Clear();
|
||||
|
||||
this.mockery.VerifyAllExpectationsHaveBeenMet();
|
||||
}
|
||||
|
||||
/// <summary>Tests whether the ItemAdded event is fired</summary>
|
||||
[Test]
|
||||
public void TestItemAddedEvent() {
|
||||
|
||||
Expect.Once.On(this.mockedSubscriber).
|
||||
Method("ItemAdded").
|
||||
WithAnyArguments();
|
||||
|
||||
this.observedCollection.Add(123);
|
||||
|
||||
this.mockery.VerifyAllExpectationsHaveBeenMet();
|
||||
}
|
||||
|
||||
/// <summary>Tests whether the ItemRemoved event is fired</summary>
|
||||
[Test]
|
||||
public void TestItemRemovedEvent() {
|
||||
|
||||
Expect.Once.On(this.mockedSubscriber).
|
||||
Method("ItemAdded").
|
||||
WithAnyArguments();
|
||||
|
@ -89,6 +90,7 @@ namespace Nuclex.Support.Collections {
|
|||
this.observedCollection.Add(123);
|
||||
this.observedCollection.Remove(123);
|
||||
|
||||
this.mockery.VerifyAllExpectationsHaveBeenMet();
|
||||
}
|
||||
|
||||
/// <summary>Mock object factory</summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue