/// <summary>
        /// Recursively go through all level steps and return a list of all necessary join-statements.
        /// </summary> 
        /// <param name="list">The list that needs to be filled</param> 
        /// <param name="dimension"></param>
        /// <param name="grain"></param> 
        /// <returns></returns> 
        /// <author>Jannik Arndt, Bernd Nottbeck</author>
        public virtual List<string> CollectAllJoinStatements(List<string> list, Dimension dimension, int grain)
        {
            if (grain < 0)
            {
                return list;
            }

            if (grain > 0 && dimension != null && dimension.GetCoarserDimensionLevel() != null)
                CollectAllJoinStatements(list, dimension.GetCoarserDimensionLevel()[0], --grain);

            if (dimension != null && dimension.ToTable != "")
                list.Add(CreateJoinStatementFromDimension(dimension));

            return list;
        }
 public void AddDimensionLevelTest1()
 {
     Dimension target = new Dimension();
     List<Dimension> l = new List<Dimension>() { new Dimension() };
     target.AddDimensionLevel(l);
     Assert.AreEqual(l[0], target.GetCoarserDimensionLevel()[0]);
 }
 public void AddDimensionLevelTest()
 {
     Dimension target = new Dimension();
     Dimension d = new Dimension();
     target.AddDimensionLevel(d);
     Assert.AreEqual(d, target.GetCoarserDimensionLevel()[0]);
 }