/// <summary>
        /// Creates a new instance with the specified owner for a set of report nodes.
        /// </summary>
        /// <param name="owner">The owner of all the report nodes stored in the current <see cref="ReportNodeCollection{T}"/> instance.</param>
        /// <param name="factory">The factory instance which is used to create new report node instance.</param>
        public ReportNodeCollection(IReportNodeOwner owner, IReportNodeFactory factory)
        {
            Owner   = owner;
            Factory = factory;

            _list = new List <T>();
        }
        public StepReport(ReportNodeType node, IReportNodeOwner owner) : base(node, owner)
        {
            Contexts = new ReportNodeCollection <ContextReport>(this, ReportNodeFactory.Instance);
            SubSteps = new ReportNodeCollection <StepReport>(this, ReportNodeFactory.Instance);

            AllStepsEnumerator = new ReportNodeEnumerator <StepReport>();
        }
        public BCStepReport(ReportNodeType node, IReportNodeOwner owner) : base(node, owner)
        {
            SubBCSteps = new ReportNodeCollection <BCStepReport>(this, BCStepReportNodeFactory.Instance);

            AllBCStepsEnumerator = new ReportNodeEnumerator <BCStepReport>();

            OwnerBusinessComponent = owner as BusinessComponentReport;
        }
        public IterationReport(ReportNodeType node, IReportNodeOwner owner) : base(node, owner)
        {
            Groups             = new ReportNodeCollection <GroupReport>(this, ReportNodeFactory.Instance);
            Flows              = new ReportNodeCollection <FlowReport>(this, ReportNodeFactory.Instance);
            Branches           = new ReportNodeCollection <BranchReport>(this, ReportNodeFactory.Instance);
            BusinessComponents = new ReportNodeCollection <BusinessComponentReport>(this, ReportNodeFactory.Instance);
            RecoverySteps      = new ReportNodeCollection <RecoveryStepReport>(this, ReportNodeFactory.Instance);
            GeneralSteps       = new ReportNodeCollection <GeneralStepReport>(this, ReportNodeFactory.Instance);

            AllBCsEnumerator = new ReportNodeEnumerator <BusinessComponentReport>();
        }
        public ActionReport(ReportNodeType node, IReportNodeOwner owner) : base(node, owner)
        {
            ActionIterations = new ReportNodeCollection <ActionIterationReport>(this, ReportNodeFactory.Instance);
            Contexts         = new ReportNodeCollection <ContextReport>(this, ReportNodeFactory.Instance);
            Steps            = new ReportNodeCollection <StepReport>(this, ReportNodeFactory.Instance);
            SubActions       = new ReportNodeCollection <ActionReport>(this, ReportNodeFactory.Instance);

            AllStepsEnumerator = new ReportNodeEnumerator <StepReport>();

            OwnerIteration = Owner as IterationReport;
        }
예제 #6
0
 public GeneralReportNode(ReportNodeType node, IReportNodeOwner owner)
 {
     Node      = node;
     Owner     = owner;
     OwnerTest = Owner != null ? Owner.OwnerTest : null;
 }
        public IterationReport(ReportNodeType node, IReportNodeOwner owner) : base(node, owner)
        {
            Activities = new ReportNodeCollection <ActivityReport>(this, ReportNodeFactory.Instance);

            AllActivitiesEnumerator = new ReportNodeEnumerator <ActivityReport>();
        }
예제 #8
0
        T IReportNodeFactory.Create <T>(ReportNodeType node, ReportNodeType parentNode, IReportNodeOwner owner)
        {
            if (node == null || typeof(T) != typeof(BCStepReport))
            {
                return(null);
            }

            return(new BCStepReport(node, owner) as T);
        }
        T IReportNodeFactory.Create <T>(ReportNodeType node, ReportNodeType parentNode, IReportNodeOwner owner)
        {
            if (node == null)
            {
                return(null);
            }

            string nodeType = node.type.ToLower();

            switch (nodeType)
            {
            case NodeType_TestRun:
                return(null);

            case NodeType_Iteration:
                return(new IterationReport(node, owner) as T);

            default:
                return(new ActivityReport(node, owner) as T);
            }
        }
예제 #10
0
        T IReportNodeFactory.Create <T>(ReportNodeType node, ReportNodeType parentNode, IReportNodeOwner owner)
        {
            if (node == null)
            {
                return(null);
            }

            string nodeType = node.type.ToLower();

            switch (nodeType)
            {
            case NodeType_TestRun:
                return(null);

            case NodeType_Iteration:
                if (parentNode != null && parentNode.type.ToLower() == NodeType_Action)
                {
                    // create action iteration report
                    return(new ActionIterationReport(node, owner) as T);
                }
                return(new IterationReport(node, owner) as T);

            case NodeType_Action:
                return(new ActionReport(node, owner) as T);

            case NodeType_Context:
                return(new ContextReport(node, owner) as T);

            default:
                return(new StepReport(node, owner) as T);
            }
        }
        T IReportNodeFactory.Create <T>(ReportNodeType node, ReportNodeType parentNode, IReportNodeOwner owner)
        {
            if (node == null)
            {
                return(null);
            }

            string nodeType = node.type.ToLower();

            switch (nodeType)
            {
            case NodeType_BPTestRun:
                return(null);

            case NodeType_Iteration:
                return(new IterationReport(node, owner) as T);

            case NodeType_Group:
                return(new GroupReport(node, owner) as T);

            case NodeType_Flow:
                return(new FlowReport(node, owner) as T);

            case NodeType_BranchCase:
                return(new BranchReport(node, owner) as T);

            case NodeType_BC:
                return(new BusinessComponentReport(node, owner) as T);

            case NodeType_Step:
                if (node.Data.Extension.NodeType != null && node.Data.Extension.NodeType.Trim().ToLower() == NodeType_Recovery)
                {
                    return(new RecoveryStepReport(node, owner) as T);
                }
                else
                {
                    return(new GeneralStepReport(node, owner) as T);
                }

            default:
                return(null);
            }
        }