Fixed errors introduced into the unit tests by the lengthy rename operation earlier this day

git-svn-id: file:///srv/devel/repo-conversion/nusu@68 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2008-03-27 18:45:09 +00:00
parent 8ef451a731
commit 26cb8c08af
3 changed files with 27 additions and 27 deletions

View File

@ -29,11 +29,11 @@ namespace Nuclex.Support.Scheduling {
/// <typeparam name="OperationType">
/// Type of the child operations the QueueOperation will contain
/// </typeparam>
public class QueueOperation<OperationType> : Operation
public class QueueOperation<OperationType> : Operation, IProgressReporter
where OperationType : Operation {
/// <summary>will be triggered to report when progress has been achieved</summary>
public event EventHandler<ProgressReportEventArgs> AsyncProgressUpdated;
public event EventHandler<ProgressReportEventArgs> AsyncProgressChanged;
/// <summary>Initializes a new queue operation with default weights</summary>
/// <param name="childs">Child operations to execute in this operation</param>
@ -114,7 +114,7 @@ namespace Nuclex.Support.Scheduling {
/// Progression's ProgressUpdateEventArgs class.
/// </remarks>
protected virtual void OnAsyncProgressChanged(ProgressReportEventArgs eventArguments) {
EventHandler<ProgressReportEventArgs> copy = AsyncProgressUpdated;
EventHandler<ProgressReportEventArgs> copy = AsyncProgressChanged;
if(copy != null)
copy(this, eventArguments);
}

View File

@ -41,7 +41,7 @@ namespace Nuclex.Support.Tracking {
/// <summary>Called when the progression tracker's progress changes</summary>
/// <param name="sender">Progression tracker whose progress has changed</param>
/// <param name="e">Contains the new progress achieved</param>
void ProgressUpdated(object sender, ProgressReportEventArgs e);
void ProgressChanged(object sender, ProgressReportEventArgs e);
/// <summary>Called when the progression tracker's idle state changes</summary>
/// <param name="sender">Progression tracker whose idle state has changed</param>
@ -55,11 +55,11 @@ namespace Nuclex.Support.Tracking {
#region class ProgressUpdateEventArgsMatcher
/// <summary>Compares two ProgressUpdateEventArgsInstances for NMock validation</summary>
private class ProgressUpdateEventArgsMatcher : Matcher {
private class ProgressReportEventArgsMatcher : Matcher {
/// <summary>Initializes a new ProgressUpdateEventArgsMatcher </summary>
/// <param name="expected">Expected progress update event arguments</param>
public ProgressUpdateEventArgsMatcher(ProgressReportEventArgs expected) {
public ProgressReportEventArgsMatcher(ProgressReportEventArgs expected) {
this.expected = expected;
}
@ -94,7 +94,7 @@ namespace Nuclex.Support.Tracking {
#region class TestProgression
/// <summary>Progression used for testing in this unit test</summary>
private class TestProgression : Waitable {
private class TestProgression : Waitable, IProgressReporter {
/// <summary>will be triggered to report when progress has been achieved</summary>
public event EventHandler<ProgressReportEventArgs> AsyncProgressChanged;
@ -157,11 +157,11 @@ namespace Nuclex.Support.Tracking {
WithAnyArguments();
Expect.Exactly(2).On(mockedSubscriber).
Method("ProgressUpdated").
Method("ProgressChanged").
With(
new Matcher[] {
new NMock2.Matchers.TypeMatcher(typeof(ProgressTracker)),
new ProgressUpdateEventArgsMatcher(new ProgressReportEventArgs(0.0f))
new ProgressReportEventArgsMatcher(new ProgressReportEventArgs(0.0f))
}
);
@ -171,11 +171,11 @@ namespace Nuclex.Support.Tracking {
tracker.Track(test2);
Expect.Once.On(mockedSubscriber).
Method("ProgressUpdated").
Method("ProgressChanged").
With(
new Matcher[] {
new NMock2.Matchers.TypeMatcher(typeof(ProgressTracker)),
new ProgressUpdateEventArgsMatcher(new ProgressReportEventArgs(0.25f))
new ProgressReportEventArgsMatcher(new ProgressReportEventArgs(0.25f))
}
);
@ -203,11 +203,11 @@ namespace Nuclex.Support.Tracking {
WithAnyArguments();
Expect.Exactly(2).On(mockedSubscriber).
Method("ProgressUpdated").
Method("ProgressChanged").
With(
new Matcher[] {
new NMock2.Matchers.TypeMatcher(typeof(ProgressTracker)),
new ProgressUpdateEventArgsMatcher(new ProgressReportEventArgs(0.0f))
new ProgressReportEventArgsMatcher(new ProgressReportEventArgs(0.0f))
}
);
@ -217,22 +217,22 @@ namespace Nuclex.Support.Tracking {
tracker.Track(test2);
Expect.Once.On(mockedSubscriber).
Method("ProgressUpdated").
Method("ProgressChanged").
With(
new Matcher[] {
new NMock2.Matchers.TypeMatcher(typeof(ProgressTracker)),
new ProgressUpdateEventArgsMatcher(new ProgressReportEventArgs(0.25f))
new ProgressReportEventArgsMatcher(new ProgressReportEventArgs(0.25f))
}
);
test1.ChangeProgress(0.5f);
Expect.Once.On(mockedSubscriber).
Method("ProgressUpdated").
Method("ProgressChanged").
With(
new Matcher[] {
new NMock2.Matchers.TypeMatcher(typeof(ProgressTracker)),
new ProgressUpdateEventArgsMatcher(new ProgressReportEventArgs(0.75f))
new ProgressReportEventArgsMatcher(new ProgressReportEventArgs(0.75f))
}
);
@ -242,11 +242,11 @@ namespace Nuclex.Support.Tracking {
test2.End();
Expect.Once.On(mockedSubscriber).
Method("ProgressUpdated").
Method("ProgressChanged").
With(
new Matcher[] {
new NMock2.Matchers.TypeMatcher(typeof(ProgressTracker)),
new ProgressUpdateEventArgsMatcher(new ProgressReportEventArgs(1.0f))
new ProgressReportEventArgsMatcher(new ProgressReportEventArgs(1.0f))
}
);
@ -289,11 +289,11 @@ namespace Nuclex.Support.Tracking {
WithAnyArguments();
Expect.Once.On(mockedSubscriber).
Method("ProgressUpdated").
Method("ProgressChanged").
With(
new Matcher[] {
new NMock2.Matchers.TypeMatcher(typeof(ProgressTracker)),
new ProgressUpdateEventArgsMatcher(new ProgressReportEventArgs(0.0f))
new ProgressReportEventArgsMatcher(new ProgressReportEventArgs(0.0f))
}
);
@ -301,22 +301,22 @@ namespace Nuclex.Support.Tracking {
tracker.Track(test1);
Expect.Once.On(mockedSubscriber).
Method("ProgressUpdated").
Method("ProgressChanged").
With(
new Matcher[] {
new NMock2.Matchers.TypeMatcher(typeof(ProgressTracker)),
new ProgressUpdateEventArgsMatcher(new ProgressReportEventArgs(0.5f))
new ProgressReportEventArgsMatcher(new ProgressReportEventArgs(0.5f))
}
);
tracker.Track(Waitable.EndedDummy);
Expect.Once.On(mockedSubscriber).
Method("ProgressUpdated").
Method("ProgressChanged").
With(
new Matcher[] {
new NMock2.Matchers.TypeMatcher(typeof(ProgressTracker)),
new ProgressUpdateEventArgsMatcher(new ProgressReportEventArgs(1.0f))
new ProgressReportEventArgsMatcher(new ProgressReportEventArgs(1.0f))
}
);
@ -359,7 +359,7 @@ namespace Nuclex.Support.Tracking {
new EventHandler<IdleStateEventArgs>(mockedSubscriber.IdleStateChanged);
tracker.AsyncProgressChanged +=
new EventHandler<ProgressReportEventArgs>(mockedSubscriber.ProgressUpdated);
new EventHandler<ProgressReportEventArgs>(mockedSubscriber.ProgressChanged);
return mockedSubscriber;
}

View File

@ -220,7 +220,7 @@ namespace Nuclex.Support.Tracking {
ISetProgressionSubscriber mockedSubscriber = mockSubscriber(testSetProgression);
Expect.Exactly(2).On(mockedSubscriber).
Method("ProgressUpdated").
Method("ProgressChanged").
WithAnyArguments();
Expect.Once.On(mockedSubscriber).