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); }
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); }