I am having problems with the behavior testing module that I wrote. The behavior is as follows:
NumericTextBoxBehavior : Behavior<TextBox> {
During module testing, I wrote this code
TextBox textBoxInvoker = new TextBox(); NumericTextBoxBehavior target = new NumericTextBoxBehavior(); System.Windows.Interactivity.Interaction.GetBehaviors(TextBoxInvoker).Add(target);
Now, to raise an event, I need to call
textBoxInvoker.RaiseEvent(routedEventArgs)
in this argument, arged routing, in turn, takes a routed event as an argument.
Please help me create a mock RoutedEventArgs to raise this event and then Unit test behavior.
Thanks in advance.
source share