예제 #1
0
        public void OnLoaded_WhenReceived_DefaultFontIsArialWithSize13()
        {
            var notepad = new NotePad();
            notepad.RaiseEvent(new RoutedEventArgs(FrameworkElement.LoadedEvent));

            Assert.That(notepad.Document.FontFamily.FamilyNames.Values, Is.EquivalentTo(new[] { "Arial" }));
            Assert.That(notepad.Document.FontSize, Is.EqualTo(13d));
        }
예제 #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));
        }