Example #1
0
        protected void LoadAndRunTestAssembly(fit.Parse cell, string testAssembly)
        {
            testRunner = new TestDomain();

            if (!testRunner.Load(new TestPackage(testAssembly)))
            {
                this.wrong(cell);
                cell.addToBody(string.Format(
                                   "<font size=-1 color=\"#c08080\"> <i>Failed to load {0}</i></font>", testAssembly));

                return;
            }

            testResult  = testRunner.Run(NullListener.NULL);
            testSummary = new ResultSummarizer(testResult);

            this.right(cell);
        }
Example #2
0
        public override void DoTable(fit.Parse theTable)
        {
            if (Args.Length > 0)
            {
                String         requestedEnv = Args[0].ToUpper().Trim();
                IDbEnvironment env;
                if ("ORACLE".Equals(requestedEnv))
                {
                    env = MakeEnvironment("dbfit.OracleEnvironment");
                }
                else if ("SQLSERVER".Equals(requestedEnv))
                {
                    env = MakeEnvironment("dbfit.SqlServerEnvironment");
                }
                else if ("SQLSERVER2000".Equals(requestedEnv))
                {
                    env = MakeEnvironment("dbfit.SqlServer2000Environment");
                }
                else if ("SYBASE".Equals(requestedEnv))
                {
                    env = MakeEnvironment("dbfit.SybaseEnvironment");
                }
                else if ("MYSQL".Equals(requestedEnv))
                {
                    env = MakeEnvironment("dbfit.MySqlEnvironment");
                }

                /*  else if ("DB2".Equals(requestedEnv))
                 * env = Processor.Create("DB2Environment", new TreeList<Cell>()); */
                else
                {
                    throw new ApplicationException("DB Environment not supported " + requestedEnv);
                }
                DbEnvironmentFactory.DefaultEnvironment = env;
                mySystemUnderTest = DbEnvironmentFactory.DefaultEnvironment;
            }
            base.DoTable(theTable);
        }
Example #3
0
        public override void DoTable(fit.Parse theTable)
        {
            if (Args.Length > 0)
            {
                IDbEnvironment env;
                String         requestedEnv = Args[0].ToUpper().Trim();
                if ("ORACLE".Equals(requestedEnv))
                {
                    env = new OracleEnvironment();
                }
                else if ("SQLSERVER".Equals(requestedEnv))
                {
                    env = new SqlServerEnvironment();
                }
                else if ("SQLSERVER2000".Equals(requestedEnv))
                {
                    env = new SqlServer2000Environment();
                }
                else if ("DB2".Equals(requestedEnv))
                {
                    throw new ApplicationException("Moved DB2 Environment to dbfit.DB2 assembly. Need to instantiate here.");
                }
                //env = new DB2Environment();
                else if ("MYSQL".Equals(requestedEnv))
                {
                    env = Activator.CreateInstance(Type.GetType("dbfit.MySqlEnvironment, dbfit.MySql")) as IDbEnvironment;
                }

                else
                {
                    throw new ApplicationException("DB Environment not supported " + requestedEnv);
                }
                DbEnvironmentFactory.DefaultEnvironment = env;
                this.mySystemUnderTest = env;
            }
            base.DoTable(theTable);
        }
Example #4
0
 public override void DoCell(fit.Parse cell, int columnNumber)
 {
     fit.Configuration.Instance.Namespaces.Remove(cell.Text);
 }
 private fit.Parse td(string body, fit.Parse more)
 {
     return(new fit.Parse("td", info(body), null, more));
 }
 private fit.Parse tr(fit.Parse parts, fit.Parse more)
 {
     return(new fit.Parse("tr", null, parts, more));
 }
Example #7
0
 public override void DoTable(fit.Parse table)
 {
     SetParameterValue(Args[0], GetArgumentInput(1, typeof(object)));
 }