public void AddNextSibling(string s, string expected)
        {
            var parsed = new HierarchicalNumber(s);

            var nextSibling = parsed.CreateNextSibling();

            Assert.Equal(expected, nextSibling.ToString());
        }
        private static void NumberStatements(HierarchicalNumber startingNumber, IEnumerable <IStatement> statements)
        {
            HierarchicalNumber currentNumber = startingNumber;

            foreach (IStatement statement in statements)
            {
                statement.Number = currentNumber.ToString();

                HierarchicalNumber currentBlockNumber = currentNumber.CreateFirstChild();

                foreach (IBlock block in statement.Blocks)
                {
                    block.Number = currentBlockNumber.ToString();

                    NumberStatements(currentBlockNumber.CreateFirstChild(), block.Elements.OfType <IStatement>());

                    currentBlockNumber = currentBlockNumber.CreateNextSibling();
                }

                currentNumber = currentNumber.CreateNextSibling();
            }
        }