Reputation: 21
I'm testing my wpf application and I need to verify if certain usercontrol events correctly raise or not like, for example, Loaded/Unloaded events. I've already created my UserControl class (I'm using DevExpress WPF Controls) because I know that TestStack.White doesn't support natively third party controls, the code is this:
[ControlTypeMapping(CustomUIItemType.Custom, WindowsFramework.Wpf)]
public class UserControl : CustomUIItem
{
public UserControl(
AutomationElement automationElement,
ActionListener actionListener)
: base(automationElement, actionListener)
{
}
protected UserControl()
{
}
public event RoutedEventHandler Loaded;
public event RoutedEventHandler Unloaded;
}
but now I don't understand how I can verify events raising or not. Does anyone help me? Thanks
Upvotes: 2
Views: 196