Created
April 19, 2010 21:03
-
-
Save follesoe/371625 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void Fires_event_when_recording_is_complete() | |
{ | |
string filename = null; | |
viewModel.RecordingComplete += (o, e) => filename = e.Filename; | |
viewModel.RecordingCommand.Execute(null); // Start recording | |
viewModel.RecordingCommand.Execute(null); // Stop recording | |
Assert.IsNotNull(filename, "Should fire event when recording is complete."); | |
} | |
// Causing an event to raise automatically when Submit is invoked | |
mock.Setup(foo => foo.Submit()).Raises(f => f.Sent += null, EventArgs.Empty); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment