예제 #1
0
        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));
        }
예제 #2
0
        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));
        }