public void OnLoaded_WhenReceived_DefaultFontFamilyAndSizeSet() { var notepad = new NotePad(); notepad.RaiseEvent(new RoutedEventArgs(FrameworkElement.LoadedEvent)); Assert.That(notepad.Document.FontFamily.FamilyNames.Values, Is.EquivalentTo(TextStyles.Body.FontFamily.FamilyNames.Values)); Assert.That(notepad.Document.FontSize, Is.EqualTo(TextStyles.Body.FontSize)); }
public void Document_Set_DocumentOfEditorGetsUpdated() { var notepad = new NotePad(); notepad.RaiseEvent(new RoutedEventArgs(FrameworkElement.LoadedEvent)); Assert.That(notepad.Document, Is.SameAs(notepad.myEditor.Document)); notepad.Document = new FlowDocument(); Assert.That(notepad.Document, Is.SameAs(notepad.myEditor.Document)); }