Exemplo n.º 1
0
        public void GetListOperationNoErrorWithNegativeInputTest(string db, string provider)
        {
            CreateOnixDbContext(db, provider);
            ArrayList arr = CreateMultipleItems <CompanyProfile>(db, provider, param, 100, "TESTING");

            QueryRequestParam qrp = new QueryRequestParam();

            qrp.ByChunk  = true;
            qrp.PageSize = 9000;

            qrp.AddFilter("Code", "RUNKNOWN_OPERATOR", "N0");
            qrp.AddFilter("UnknownField", "CONTAIN", "ABC");

            qrp.AddOrderBy("UnknownField", "DESC");
            qrp.AddOrderBy("Code", "DESC");
            qrp.AddOrderBy("Name", "DESC");

            try
            {
                QueryResponseParam response = GetListOperationWithParameter <CompanyProfile>(db, provider, param, qrp);
            }
            catch
            {
                Assert.Fail("Exception should not thrown here!!!");
            }
        }
Exemplo n.º 2
0
        public void GetListOperationWithParameter(string db, string provider)
        {
            CreateOnixDbContext(db, provider);

            QueryRequestParam qrp = new QueryRequestParam();

            qrp.AddFilter("Code", "EQUAL", "N0");
            qrp.AddFilter("Name", "CONTAIN", "ABC");
            qrp.AddFilter("CompanyProfileId", "=", "1000");
            qrp.AddFilter("CompanyProfileId", "IS_NULL", "N");
            qrp.AddFilter("Key", "IS_NULL", "Y");

            qrp.AddOrderBy("Type", "DESC");
            qrp.AddOrderBy("Code", "ASC");
            QueryResponseParam response = GetListOperationWithParameter <CompanyProfile>(db, provider, param, qrp);

            //Assert.AreEqual(true, checkOk, "Unexpected return value from GetCompanyProfileList()!!!");
        }