public void ClassAddTestUsingoAuth(ServiceContext qboContextoAuth)
 {
     //Creating the Class for Add
     Class class1 = QBOHelper.CreateClass(qboContextoAuth);
     //Adding the Class
     Class added = Helper.Add <Class>(qboContextoAuth, class1);
 }
        public void ClassAddAsyncTestsUsingoAuth(ServiceContext qboContextoAuth)
        {
            //Creating the Class for Add
            Class entity = QBOHelper.CreateClass(qboContextoAuth);

            Class added = Helper.AddAsync <Class>(qboContextoAuth, entity);
        }
 public void ClassFindbyIdTestUsingoAuth(ServiceContext qboContextoAuth)
 {
     //Creating the Class for Adding
     Class class1 = QBOHelper.CreateClass(qboContextoAuth);
     //Adding the Class
     Class added = Helper.Add <Class>(qboContextoAuth, class1);
     Class found = Helper.FindById <Class>(qboContextoAuth, added);
 }
Exemple #4
0
        public void ClassVoidAsyncTestsUsingoAuth()
        {
            //Creating the Class for Adding
            Class entity = QBOHelper.CreateClass(qboContextoAuth);
            //Adding the Class
            Class added = Helper.Add <Class>(qboContextoAuth, entity);

            Helper.VoidAsync <Class>(qboContextoAuth, added);
        }
Exemple #5
0
        public void ClassAddAsyncTestsUsingoAuth()
        {
            //Creating the Class for Add
            Class entity = QBOHelper.CreateClass(qboContextoAuth);

            Class added = Helper.AddAsync <Class>(qboContextoAuth, entity);

            QBOHelper.VerifyClass(entity, added);
        }
Exemple #6
0
        public void ClassAddTestUsingoAuth()
        {
            //Creating the Class for Add
            Class class1 = QBOHelper.CreateClass(qboContextoAuth);
            //Adding the Class
            Class added = Helper.Add <Class>(qboContextoAuth, class1);

            //Verify the added Class
            QBOHelper.VerifyClass(class1, added);
        }
        public void ClassFindByIdAsyncTestsUsingoAuth(ServiceContext qboContextoAuth)
        {
            //Creating the Class for Adding
            Class entity = QBOHelper.CreateClass(qboContextoAuth);
            //Adding the Class
            Class added = Helper.Add <Class>(qboContextoAuth, entity);

            //FindById and verify
            Helper.FindByIdAsync <Class>(qboContextoAuth, added);
        }
 public void ClassSparseUpdateTestUsingoAuth(ServiceContext qboContextoAuth)
 {
     //Creating the Class for Adding
     Class class1 = QBOHelper.CreateClass(qboContextoAuth);
     //Adding the Class
     Class added = Helper.Add <Class>(qboContextoAuth, class1);
     //Change the data of added entity
     Class changed = QBOHelper.SparseUpdateClass(qboContextoAuth, added.Id, added.SyncToken);
     //Update the returned entity data
     Class updated = Helper.Update <Class>(qboContextoAuth, changed);//Verify the updated Class
 }
        public void ClassUpdatedAsyncTestsUsingoAuth(ServiceContext qboContextoAuth)
        {
            //Creating the Class for Adding
            Class entity = QBOHelper.CreateClass(qboContextoAuth);
            //Adding the Class
            Class added = Helper.Add <Class>(qboContextoAuth, entity);

            //Update the Class
            Class updated = QBOHelper.UpdateClass(qboContextoAuth, added);
            //Call the service
            Class updatedReturned = Helper.UpdateAsync <Class>(qboContextoAuth, updated);
        }
Exemple #10
0
        public void ClassUpdateTestUsingoAuth()
        {
            //Creating the Class for Adding
            Class class1 = QBOHelper.CreateClass(qboContextoAuth);
            //Adding the Class
            Class added = Helper.Add <Class>(qboContextoAuth, class1);
            //Change the data of added entity
            Class changed = QBOHelper.UpdateClass(qboContextoAuth, added);
            //Update the returned entity data
            Class updated = Helper.Update <Class>(qboContextoAuth, changed);//Verify the updated Class

            QBOHelper.VerifyClass(changed, updated);
        }
        public void ClassBatchUsingoAuth(ServiceContext qboContextoAuth)
        {
            Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>();

            Class existing = Helper.FindOrAdd(qboContextoAuth, new Class());

            batchEntries.Add(OperationEnum.create, QBOHelper.CreateClass(qboContextoAuth));

            batchEntries.Add(OperationEnum.update, QBOHelper.UpdateClass(qboContextoAuth, existing));

            batchEntries.Add(OperationEnum.query, "select * from Class");

            // batchEntries.Add(OperationEnum.delete, existing);

            ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.Batch <Class>(qboContextoAuth, batchEntries);
        }
Exemple #12
0
        public void ClassVoidTestUsingoAuth()
        {
            //Creating the Class for Adding
            Class class1 = QBOHelper.CreateClass(qboContextoAuth);
            //Adding the Class
            Class added = Helper.Add <Class>(qboContextoAuth, class1);

            //Void the returned entity
            try
            {
                Class voided = Helper.Void <Class>(qboContextoAuth, added);
                Assert.AreEqual(EntityStatusEnum.Voided, voided.status);
            }
            catch (IdsException ex)
            {
                Assert.Fail();
            }
        }
Exemple #13
0
        public void ClassBatchUsingoAuth()
        {
            Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>();

            Class existing = Helper.FindOrAdd(qboContextoAuth, new Class());

            batchEntries.Add(OperationEnum.create, QBOHelper.CreateClass(qboContextoAuth));

            batchEntries.Add(OperationEnum.update, QBOHelper.UpdateClass(qboContextoAuth, existing));

            batchEntries.Add(OperationEnum.query, "select * from Class");

            // batchEntries.Add(OperationEnum.delete, existing);

            ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.BatchTest <Class>(qboContextoAuth, batchEntries);

            int position = 0;

            foreach (IntuitBatchResponse resp in batchResponses)
            {
                if (resp.ResponseType == ResponseType.Exception)
                {
                    Assert.Fail(resp.Exception.ToString());
                }

                if (resp.ResponseType == ResponseType.Entity)
                {
                    Assert.IsFalse(string.IsNullOrEmpty((resp.Entity as Class).Id));
                }
                else if (resp.ResponseType == ResponseType.Query)
                {
                    Assert.IsTrue(resp.Entities != null && resp.Entities.Count > 0);
                }
                else if (resp.ResponseType == ResponseType.CdcQuery)
                {
                    Assert.IsTrue(resp.CDCResponse != null && resp.CDCResponse.entities != null && resp.CDCResponse.entities.Count > 0);
                }

                position++;
            }
        }