Ejemplo n.º 1
0
        static void test_getSpec()
        {
            TbiesIntf intf = new TbiesIntf("192.168.56.2");

            List <Specification> specs = intf.getSpecsBrief();

            Debug.Assert(specs.Count > 0);

            Specification spec = intf.getSpec("100C_Template");

            Debug.Assert(spec != null);
        }
Ejemplo n.º 2
0
        static void test_transformSpec()
        {
            TbiesIntf intf = new TbiesIntf("192.168.56.2");

            List <Specification>   specs   = intf.getSpecsBrief();
            List <BISpecification> biSpecs = BISpecification.transformFromApp(specs);

            Debug.Assert(biSpecs.Count > 0);

            foreach (var spec in specs)
            {
                Specification   wholeSpec = intf.getSpec(spec.name);
                BISpecification biSpec    = BISpecification.transformFromApp(wholeSpec);
                Debug.Assert(biSpec.Specification != null);
                Debug.Assert(biSpec.Configuration != null);
            }
        }
Ejemplo n.º 3
0
 public void FetchPlansList(IDatabaseService service)
 {
     if (this._serverIp.ToUpper() == "")
     {
         var specTable = service.GetValidSpecificationTable();
         foreach (DataRow row in specTable.Rows)
         {
             this._specSet[row["Plan"].ToString()] = AnalyzePlan.Deserialize(row["Content"].ToString());
         }
     }
     else
     {
         TbiesIntf              intf    = new TbiesIntf(this._serverIp);
         List <Specification>   specs   = intf.getSpecsBrief();
         List <BISpecification> biSpecs = AnalyzePlan.TransformFromApp(specs);
         foreach (BISpecification spec in biSpecs)
         {
             this._specSet[spec.Plan] = spec;
         }
     }
 }