Queue operation fully implemented; added small unit test for queue operation; some comment improvements in other code sections
git-svn-id: file:///srv/devel/repo-conversion/nusu@36 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
850db0cded
commit
4933604495
7 changed files with 357 additions and 33 deletions
|
@ -180,20 +180,6 @@ namespace Nuclex.Support.Tracking {
|
|||
this.mockery.VerifyAllExpectationsHaveBeenMet();
|
||||
}
|
||||
|
||||
/// <summary>Mocks a subscriber for the events of a progression</summary>
|
||||
/// <param name="progression">Progression to mock an event subscriber for</param>
|
||||
/// <returns>The mocked event subscriber</returns>
|
||||
private ISetProgressionSubscriber mockSubscriber(Progression progression) {
|
||||
ISetProgressionSubscriber mockedSubscriber =
|
||||
this.mockery.NewMock<ISetProgressionSubscriber>();
|
||||
|
||||
progression.AsyncEnded += new EventHandler(mockedSubscriber.Ended);
|
||||
progression.AsyncProgressUpdated +=
|
||||
new EventHandler<ProgressUpdateEventArgs>(mockedSubscriber.ProgressUpdated);
|
||||
|
||||
return mockedSubscriber;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates that the ended event is triggered when the last progression ends
|
||||
/// </summary>
|
||||
|
@ -220,6 +206,20 @@ namespace Nuclex.Support.Tracking {
|
|||
this.mockery.VerifyAllExpectationsHaveBeenMet();
|
||||
}
|
||||
|
||||
/// <summary>Mocks a subscriber for the events of a progression</summary>
|
||||
/// <param name="progression">Progression to mock an event subscriber for</param>
|
||||
/// <returns>The mocked event subscriber</returns>
|
||||
private ISetProgressionSubscriber mockSubscriber(Progression progression) {
|
||||
ISetProgressionSubscriber mockedSubscriber =
|
||||
this.mockery.NewMock<ISetProgressionSubscriber>();
|
||||
|
||||
progression.AsyncEnded += new EventHandler(mockedSubscriber.Ended);
|
||||
progression.AsyncProgressUpdated +=
|
||||
new EventHandler<ProgressUpdateEventArgs>(mockedSubscriber.ProgressUpdated);
|
||||
|
||||
return mockedSubscriber;
|
||||
}
|
||||
|
||||
/// <summary>Mock object factory</summary>
|
||||
private Mockery mockery;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue