public void AttachableFindByIdAsyncTestsUsingoAuth(ServiceContext qboContextoAuth) { //Creating the Attachable for Adding Attachable entity = QBOHelper.CreateAttachable(qboContextoAuth); //Adding the Attachable Attachable added = Helper.Add <Attachable>(qboContextoAuth, entity); }
public void AttachableFindbyIdTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the Attachable for Adding Attachable attachable = QBOHelper.CreateAttachable(qboContextoAuth); //Adding the Attachable Attachable added = Helper.Add <Attachable>(qboContextoAuth, attachable); Attachable found = Helper.FindById <Attachable>(qboContextoAuth, added); }
//This attachable endpoint is used to add a note public void AttachableAddTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the Attachable for Add Attachable attachable = QBOHelper.CreateAttachable(qboContextoAuth); //Adding the Attachable Attachable added = Helper.Add <Attachable>(qboContextoAuth, attachable); //Verify the added Attachable }
public void AttachableVoidAsyncTestsUsingoAuth() { //Creating the Attachable for Adding Attachable entity = QBOHelper.CreateAttachable(qboContextoAuth); //Adding the Attachable Attachable added = Helper.Add <Attachable>(qboContextoAuth, entity); Helper.VoidAsync <Attachable>(qboContextoAuth, added); }
public void AttachableAddAsyncTestsUsingoAuth() { //Creating the Attachable for Add Attachable entity = QBOHelper.CreateAttachable(qboContextoAuth); Attachable added = Helper.AddAsync <Attachable>(qboContextoAuth, entity); QBOHelper.VerifyAttachable(entity, added); }
public void AttachableUpdateTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the Attachable for Adding Attachable attachable = QBOHelper.CreateAttachable(qboContextoAuth); //Adding the Attachable Attachable added = Helper.Add <Attachable>(qboContextoAuth, attachable); //Change the data of added entity Attachable changed = QBOHelper.UpdateAttachable(qboContextoAuth, added); //Update the returned entity data Attachable updated = Helper.Update <Attachable>(qboContextoAuth, changed);//Verify the updated Attachable }
public void AttachableUpdatedAsyncTestsUsingoAuth(ServiceContext qboContextoAuth) { //Creating the Attachable for Adding Attachable entity = QBOHelper.CreateAttachable(qboContextoAuth); //Adding the Attachable Attachable added = Helper.Add <Attachable>(qboContextoAuth, entity); //Update the Attachable Attachable updated = QBOHelper.UpdateAttachable(qboContextoAuth, added); //Call the service Attachable updatedReturned = Helper.UpdateAsync <Attachable>(qboContextoAuth, updated); }
public void AttachableSparseUpdateTestUsingoAuth() { //Creating the Attachable for Adding Attachable attachable = QBOHelper.CreateAttachable(qboContextoAuth); //Adding the Attachable Attachable added = Helper.Add <Attachable>(qboContextoAuth, attachable); //Change the data of added entity Attachable changed = QBOHelper.SparseUpdateAttachable(qboContextoAuth, added.Id, added.SyncToken); //Update the returned entity data Attachable updated = Helper.Update <Attachable>(qboContextoAuth, changed);//Verify the updated Attachable QBOHelper.VerifyAttachableSparseUpdate(changed, updated); }
public void AttachableBatchUsingoAuth(ServiceContext qboContextoAuth) { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); Attachable existing = Helper.FindOrAdd(qboContextoAuth, new Attachable()); batchEntries.Add(OperationEnum.create, QBOHelper.CreateAttachable(qboContextoAuth)); batchEntries.Add(OperationEnum.update, QBOHelper.UpdateAttachable(qboContextoAuth, existing)); batchEntries.Add(OperationEnum.query, "select * from Attachable"); batchEntries.Add(OperationEnum.delete, existing); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.Batch <Attachable>(qboContextoAuth, batchEntries); }
public void AttachableDeleteTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the Attachable for Adding Attachable attachable = QBOHelper.CreateAttachable(qboContextoAuth); //Adding the Attachable Attachable added = Helper.Add <Attachable>(qboContextoAuth, attachable); //Delete the returned entity try { Attachable deleted = Helper.Delete <Attachable>(qboContextoAuth, added); } catch (IdsException ex) { } }
public void AttachableVoidTestUsingoAuth() { //Creating the Attachable for Adding Attachable attachable = QBOHelper.CreateAttachable(qboContextoAuth); //Adding the Attachable Attachable added = Helper.Add <Attachable>(qboContextoAuth, attachable); //Delete the returned entity try { Attachable voided = Helper.Void <Attachable>(qboContextoAuth, added); Assert.AreEqual(EntityStatusEnum.Voided, voided.status); } catch (IdsException ex) { Assert.Fail(); } }
public void AttachableBatchUsingoAuth() { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); Attachable existing = Helper.FindOrAdd(qboContextoAuth, new Attachable()); batchEntries.Add(OperationEnum.create, QBOHelper.CreateAttachable(qboContextoAuth)); //batchEntries.Add(OperationEnum.update, QBOHelper.UpdateAttachable(qboContextoAuth, existing)); batchEntries.Add(OperationEnum.query, "select * from Attachable"); batchEntries.Add(OperationEnum.delete, existing); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.BatchTest <Attachable>(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 Attachable).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++; } }