public SOAnalysis_Component(string name, string nickname, string description, SOAnalysis analysis)
     : base(name, 
            nickname, 
            description, 
            GHSustainabilityOpenFramework.CATEGORY, 
            GHSustainabilityOpenFramework.ANALYSIS_SUBCATEGORY)
 {
     this.m_Analysis = analysis;
 }
        public void TestAnalyses()
        {
            SOAnalysis analysis1 = new SOAnalysis(TEST_NAME);

            // analysis should not be null
            Assert.NotNull(analysis1);

            // Analyses should have zero items
            Assert.IsEmpty(analysis1.Analyses);

            // Add a SODesigner
            SODesigner designer = new SODesigner("test designer 0001");
            analysis1.AddDesigner(designer);

            // Add a SOAnalysis
            SOAnalysis analysis2 = new SOAnalysis("test analysis 0002");
            analysis1.AddAnalysis(analysis2);

            // Designers should now have one item
            Assert.AreEqual(1, analysis1.Designers.Length);
            Assert.AreEqual(designer, analysis1.Designers[0]);

            // clear the designers
            analysis1.ClearDesigners();

            // Designers should have zero items
            Assert.IsEmpty(analysis1.Designers);

            // Designers should now have one item
            Assert.AreEqual(1, analysis1.Analyses.Length);
            Assert.AreEqual(analysis2, analysis1.Analyses[0]);

            // clear the designers
            analysis1.ClearAnalyses();

            // Designers should have zero items
            Assert.IsEmpty(analysis1.Analyses);
        }
 /// <summary>
 /// Attaches an analysis to this analysis
 /// </summary>
 /// <param name="analysis">Analysis to add</param>
 public void AddAnalysis(SOAnalysis analysis)
 {
     this.AddParent(analysis);
 }
 public void AddAnalysis(SOAnalysis analysis)
 {
     this.AddParent(analysis);
 }
        public void TestName()
        {
            SOAnalysis analysis = new SOAnalysis(TEST_NAME);

            // designer should not be null
            Assert.NotNull(analysis);

            // The name should be the same
            Assert.AreEqual(TEST_NAME, analysis.Name);
        }