public DataSet SelectProjectFunctionTest(IProjectFunction projectFunction, DBGenericEntity dbGenericEntity)
        {
            DataSet tableVerify = new DataSet();

            tableVerify = dbGenericEntity.SelectObject(projectFunction) as DataSet;
            return(tableVerify);
        }
Example #2
0
        protected override void InitializeObject(IGenericEntity ent)
        {
            if (ent is IProjectFunction)
            {
                IProjectFunction projectFunction = (IProjectFunction)ent;

                DBStoredProcedure spSelect = new DBStoredProcedure();
                spSelect.ProcedureName = "bgtSelectProjectFunctions";
                this.AddStoredProcedure("SelectObject", spSelect);
            }
        }
        public void VerifyProjectFunction()
        {
            Random random = new Random();

            DBProjectFunction dbProjectFunctionEntity = new DBProjectFunction(connManager);
            IProjectFunction  projectFunction         = BusinessObjectInitializer.CreateProjectFunction();

            DataTable tableVerify = SelectProjectFunctionTest(projectFunction, dbProjectFunctionEntity).Tables[0];

            //Verifies that the table is not null
            Assert.IsNotNull(tableVerify, "The table returned should not be null");
            //Verifies that the table returns the correcty columns
            DATestUtils.CheckColumn(tableVerify, 0, "Id");
            DATestUtils.CheckColumn(tableVerify, 1, "Name");
        }