public void ConvertNullReturnsUnset()
        {
            // Arrange
            var conv = new TextToFlowDocumentConverter();

            // Act
            object converted = conv.Convert( null, null, null, null );

            // Assert
            Assert.AreEqual( DependencyProperty.UnsetValue, converted );
        }
        public void ConvertCreatesFlowDocument()
        {
            // Arrange
            var conv = new TextToFlowDocumentConverter();

            // Act
            object converted = conv.Convert( string.Empty, null, null, null );

            // Assert
            Assert.IsInstanceOfType( converted, typeof( FlowDocument ) );
            Assert.IsNotNull( converted );
        }
        public void MarkdownInstanceIsUsed()
        {
            // Arrange
            var mdMock = new Mock<Markdown>();
            mdMock.Setup( md => md.Transform( It.IsAny<string>() ) ).Returns( new FlowDocument() );

            var conv = new TextToFlowDocumentConverter
            {
                Markdown = mdMock.Object
            };

            // Act
            object converted = conv.Convert( string.Empty, null, null, null );

            // Assert
            Assert.IsInstanceOfType( converted, typeof( FlowDocument ) );
            Assert.IsNotNull( converted );

            mdMock.VerifyAll();
        }