//Rule to test class or TestStub Page
        public static BuilderPackageInterface getclassOrTestStubPage()
        {
            if (userPreviousConfig.ContainsKey("getclassOrTestStubPage"))
            {
                return(userPreviousConfig["getclassOrTestStubPage"]);
            }

            XMLReader ContextValues = new XMLReader();

            ContextValues.parseXML();

            TestStub myTestStub = new TestStub(ContextValues.testStub);


            DeclarClass  myClass  = new DeclarClass(ContextValues.ClassName);
            DeclarStruct myStruct = new DeclarStruct(ContextValues.Struct);
            DeclarDefine myDeclar = new DeclarDefine(null, myStruct);


            OrExpression myContext = new OrExpression();

            myContext.setOrExpression(myTestStub);
            myContext.setOrExpression(myDeclar);

            userPreviousConfig["getclassOrTestStubPage"] = myContext;

            return(myContext);
        }
        //Rule to get Manual Maintaince And Declare Page
        public static BuilderPackageInterface getManualMaintainceAndDeclarePage()
        {
            if (userPreviousConfig.ContainsKey("getManualMaintainceAndDeclarePage"))
            {
                return(userPreviousConfig["getManualMaintainceAndDeclarePage"]);
            }

            XMLReader ContextValues = new XMLReader();

            ContextValues.parseXML();

            Prolog                  myProlog            = new Prolog(ContextValues.prlg.Author, ContextValues.prlg.EmailID);
            PackageOperations       myPackageOperations = new PackageOperations(ContextValues.packageOps);
            BuilderPackageInterface _ManualPage         = new ManualPage(myProlog, myPackageOperations);

            ReqFiles       myReqFiles       = new ReqFiles(ContextValues.reqFiles);
            BuildProc      myBuildProc      = new BuildProc(ContextValues.buildProc);
            versionHistory myversionHistory = new versionHistory(ContextValues.version);
            Maintenance    _Maintenance     = new Maintenance(myReqFiles, myBuildProc, myversionHistory);

            DeclarClass  myClass  = new DeclarClass(ContextValues.ClassName);
            DeclarStruct myStruct = new DeclarStruct(ContextValues.Struct);
            DeclarDefine myDeclar = new DeclarDefine(null, myStruct);

            BuildPackage myContext = new BuildPackage();

            myContext.setBuildPackage(_ManualPage);
            myContext.setBuildPackage(_Maintenance);
            myContext.setBuildPackage(myDeclar);
            userPreviousConfig["getManualMaintainceAndDeclarePage"] = myContext;
            return(myContext);
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("\n\n  Testing build Package \n\n");
            // Get Context from Xml file
            XMLReader ContextValues = new XMLReader();

            ContextValues.parseXML();

            // GetRuleForCreation
            BuilderPackageInterface mybuildPkg_4 = BuilderPackagePrototype.getManualPageAndStruct();

            // Displaying to console
            Console.WriteLine(mybuildPkg_4.buildPackage(ContextValues));


            // GetRuleForCreation
            BuilderPackageInterface mybuildPkg_1 = BuilderPackagePrototype.getManualMaintainceAndDeclarePage();

            BuilderPackagePrototype.writeToFile(mybuildPkg_1.buildPackage(ContextValues), "TesetingInterpreter.cs");

            // cloning builder package
            BuilderPackageInterface mybuildPkg_2 = BuilderPackagePrototype.getManualMaintainceAndDeclarePage();

            BuilderPackagePrototype.writeToFile(mybuildPkg_2.buildPackage(ContextValues), "TesetingPrototype.cs");


            Console.WriteLine("\n");
        }
        //Rule to get Define And TestStubPage
        public static BuilderPackageInterface getDefineAndTestStubPage()
        {
            if (userPreviousConfig.ContainsKey("getDefineAndTestStubPage"))
            {
                return(userPreviousConfig["getDefineAndTestStubPage"]);
            }

            XMLReader ContextValues = new XMLReader();

            ContextValues.parseXML();

            TestStub myTestStub = new TestStub(ContextValues.testStub);

            AddExpression myContext = new AddExpression();

            myContext.setAddExpression(null);
            myContext.setAddExpression(myTestStub);
            userPreviousConfig["getDefineAndTestStubPage"] = myContext;
            return(myContext);
        }
 static void Main(string[] args)
 {
     XMLReader ContextValues = new XMLReader();
     ContextValues.parseXML();
 }
Ejemplo n.º 6
0
        static void Main(string[] args)
        {
            XMLReader ContextValues = new XMLReader();

            ContextValues.parseXML();
        }