public void FileEditor_Should_CreateElement_When_ResolveEditor() { var source = new object(); var editor = new FileEditor(); var element = editor.CreateElement(source); Assert.IsNotNull(element); }
public void FileEditor_Button_Should_OpenFileDialog() { var source = new object(); var editor = new FileEditor(); var element = editor.CreateElement(source); var grid = element as Grid; foreach (var child in grid.Children) { if (child is Button button) { button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent, button)); } } }