Where can I find comprehensive documentation for MOQ? I am just starting out with a mockery and having a hard time hugging him. I read all the links in http://code.google.com/p/moq/wiki/QuickStart , but it seems I can not find a tutorial or a gentle introduction.
I also looked briefly at Rhino Mocks, but found this very confusing.
Yes. I am reading an article by Stephen Walter - very helpful. I also looked through the links. I can not watch the video at http://www.bestechvideos.com/2008/06/08/dimecasts-net-introduction-to-mocking-with-moq [broken link]
In particular, I am trying to determine if an event was raised from a mocking class. I cannot get an example for events on the QuickStarts page to compile. In google groups, Daniel explained that CreateEventHandler can handle an event like EventHandler<TEventArgs> , but even then I cannot compile it.
In particular, I have a class that implements INotifyChanged .
public class Entity : INotifyChanged { public event PropertyChangingEventHandler PropertyChanging; public int Id { get {return _id;} set { _id = value; OnPropertyChanged("Id"); } } protected void OnPropertyChanged(string property) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } etc ..... }
How do I make fun of a class to check if the PropertyChanged event has been fired? I cannot rewrite the event to the public event EventHandler<PropertyChangedEventArgs> because I get this error:
Error 1 'CoreServices.Notifier' does not implement a member of the System.ComponentModel.INotifyPropertyChanged.PropertyChanged 'interface. "CoreServices.Notifier.PropertyChanged" cannot implement "System.ComponentModel.INotifyPropertyChanged.PropertyChanged" because it does not have the corresponding return type "System.ComponentModel.PropertyChangedEventHandler".
Jeremy Holt Oct 23 '08 at 19:44 2008-10-23 19:44
source share