public SODesigner_Component(string name, string nickname, string description, SODesigner designer)
     : base(name, 
            nickname, 
            description, 
            GHSustainabilityOpenFramework.CATEGORY, 
            GHSustainabilityOpenFramework.DESIGNER_SUBCATEGORY)
 {
     this.m_Designer = designer;
     SOGrasshopperController con = SOGrasshopperController.GetInstance(OnPingDocument());
 }
        public void TestCurrentDesignAlternative()
        {
            SODesigner designer = new SODesigner(TEST_NAME);

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

            // name of the alternative should be equal to the default
            Assert.AreEqual(SODesign.DEFAULT_ALTERNATIVE_NAME, designer.CurrentDesignAlternative.Name);
        }
        public void TestDesigners()
        {
            SODesigner designer1 = new SODesigner(TEST_NAME);
            SODesigner designer2 = new SODesigner("002");

            // initial Designers probably should be empty
            Assert.NotNull(designer1.Designers);
            Assert.IsEmpty(designer1.Designers);
            Assert.AreEqual(designer1.Designers.Length, 0);

            // add designer2 to designer1
            designer1.AddParent(designer2);

            // Designers should now contain designer2
            Assert.NotNull(designer1.Designers);
            Assert.IsNotEmpty(designer1.Designers);
            Assert.AreEqual(designer1.Designers.Length, 1);
            Assert.AreEqual(designer1.Designers[0], designer2);
        }
        public void TestAddDesigner()
        {
            SOAnalysis analysis = new SOAnalysis(TEST_NAME);

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

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

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

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

            // clear the designers
            analysis.ClearDesigners();

            // Designers should have zero items
            Assert.IsEmpty(analysis.Designers);
        }
 /// <summary>
 /// Attaches a designer to this analysis
 /// </summary>
 /// <param name="designer">Designer to add</param>
 public void AddDesigner(SODesigner designer)
 {
     this.AddParent(designer);
 }
 public void AddDesigner(SODesigner designer)
 {
     this.AddParent(designer);
 }
        public void TestName()
        {
            SODesigner designer = new SODesigner(TEST_NAME);

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

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