using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using NUnit.Framework; using Pleasant.Core; using Stimulsoft.Report; namespace Pleasant.Reporting.Tests { [TestFixture] public class StimulsoftTests { public const int Breadth = 50; public const int Depth = 2; [Test] [Ignore("Manually executed.")] public void GenerateClassHierarchy() { StringBuilder sb = new StringBuilder(); GenerateClass(sb, "C", Depth); File.WriteAllText(Path.Combine(CorePath.GetApplicationFolder(), "..", "..", "StimulsoftGenerated.cs"), sb.ToString()); } [Test] [Ignore("Manually executed.")] [STAThread] public void ShowDesignerForGeneratedClass() { var r = new StiReport(); r.RegData("DataForReport", new C()); r.DesignWithWpf(); } private void GenerateClass(StringBuilder sb, string name, int remainingDepth) { sb.AppendLine("public class " + name + "{"); sb.AppendLine("public " + name + "()" + "{"); if (remainingDepth > 0) { for(int i=0; i 0) { for(int i=0; i 0) { for (int i = 0; i < Breadth; i++) { GenerateClass(sb, name + "_" + i, remainingDepth-1); } } } } }