コード例 #1
0
        public void TranslateConnections_DoesNotChangeDirectionNonConnectedItems_WhenThereIsOneConnectionWithGivenType(MarkdownConnectionType connectionType)
        {
            var residualStrengths = new[] { 1, 2, 3, 5, 6, 7, 9 };
            var connection        = new MarkdownConnection(0, 1, connectionType);

            var mdConvertedItems = handlerConnections.TranslateConnections(new[] { connection }, residualStrengths);

            mdConvertedItems.Skip(2).Should().OnlyContain(x => x.Direction == Direction.None);
        }
コード例 #2
0
        public void TranslateConnection_NotChangesDirection_WhenGetsNonDirectedItem()
        {
            var residualStrengths = new[] { 1, 2, 3, 4 };
            var connection        = new MarkdownConnection(0, 1, MarkdownConnectionType.None);

            var mdConvertedItems = handlerConnections.TranslateConnections(new[] { connection }, residualStrengths);

            mdConvertedItems.Should().OnlyContain(x => x.Direction == Direction.None);
        }
コード例 #3
0
        public void TranslateConnections_ChangesDirection_WhenThereIsOneConnectionWithGivenType(MarkdownConnectionType connectionType)
        {
            var residualStrengths = new[] { 1, 1, 1 };
            var connection        = new MarkdownConnection(0, 2, connectionType);

            var mdConvertedItems = handlerConnections.TranslateConnections(new[] { connection }, residualStrengths).ToList();

            mdConvertedItems[0].Direction.Should().Be(Direction.Right);
            mdConvertedItems[2].Direction.Should().Be(Direction.Left);
        }