public void BudgetVoidAsyncTestsUsingoAuth() { //Creating the Budget for Adding Budget entity = QBOHelper.CreateBudget(qboContextoAuth); //Adding the Budget Budget added = Helper.Add <Budget>(qboContextoAuth, entity); Helper.VoidAsync <Budget>(qboContextoAuth, added); }
public void BudgetAddAsyncTestsUsingoAuth() { //Creating the Budget for Add Budget entity = QBOHelper.CreateBudget(qboContextoAuth); Budget added = Helper.AddAsync <Budget>(qboContextoAuth, entity); QBOHelper.VerifyBudget(entity, added); }
public void BudgetFindbyIdTestUsingoAuth() { //Creating the Budget for Adding Budget Budget = QBOHelper.CreateBudget(qboContextoAuth); //Adding the Budget Budget added = Helper.Add <Budget>(qboContextoAuth, Budget); Budget found = Helper.FindById <Budget>(qboContextoAuth, added); QBOHelper.VerifyBudget(found, added); }
[Ignore] //Waiting on the bug fix for operation name public void BudgetAddTestUsingoAuth() { //Creating the Budget for Add Budget Budget = QBOHelper.CreateBudget(qboContextoAuth); //Adding the Budget Budget added = Helper.Add <Budget>(qboContextoAuth, Budget); //Verify the added Budget QBOHelper.VerifyBudget(Budget, added); }
[Ignore] //Waiting on the bug fix for operation name public void BudgetUpdateTestUsingoAuth() { //Creating the Budget for Adding Budget Budget = QBOHelper.CreateBudget(qboContextoAuth); //Adding the Budget Budget added = Helper.Add <Budget>(qboContextoAuth, Budget); //Change the data of added entity Budget changed = QBOHelper.UpdateBudget(qboContextoAuth, added); //Update the returned entity data Budget updated = Helper.Update <Budget>(qboContextoAuth, changed);//Verify the updated Budget QBOHelper.VerifyBudget(changed, updated); }
public void BudgetSparseUpdatedAsyncTestsUsingoAuth() { //Creating the Budget for Adding Budget entity = QBOHelper.CreateBudget(qboContextoAuth); //Adding the Budget Budget added = Helper.Add <Budget>(qboContextoAuth, entity); //Update the Budget Budget updated = QBOHelper.UpdateBudgetSparse(qboContextoAuth, added.Id, added.SyncToken); //Call the service Budget updatedReturned = Helper.UpdateAsync <Budget>(qboContextoAuth, updated); //Verify updated Budget QBOHelper.VerifyBudgetSparse(updated, updatedReturned); }
public void BudgetVoidTestUsingoAuth() { //Creating the entity for Adding Budget entity = QBOHelper.CreateBudget(qboContextoAuth); //Adding the entity Budget added = Helper.Add <Budget>(qboContextoAuth, entity); //Void the returned entity try { Budget voided = Helper.Void <Budget>(qboContextoAuth, added); Assert.AreEqual(EntityStatusEnum.Voided, voided.status); } catch (IdsException ex) { Assert.Fail(); } }
[Ignore] //Waiting on the bug fix for operation name public void BudgetDeleteTestUsingoAuth() { //Creating the Budget for Adding Budget Budget = QBOHelper.CreateBudget(qboContextoAuth); //Adding the Budget Budget added = Helper.Add <Budget>(qboContextoAuth, Budget); //Delete the returned entity try { Budget deleted = Helper.Delete <Budget>(qboContextoAuth, added); Assert.AreEqual(EntityStatusEnum.Deleted, deleted.status); } catch (IdsException ex) { Assert.Fail(); } }
public void BudgetBatchUsingoAuth() { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); Budget existing = Helper.FindOrAdd(qboContextoAuth, new Budget()); batchEntries.Add(OperationEnum.create, QBOHelper.CreateBudget(qboContextoAuth)); batchEntries.Add(OperationEnum.update, QBOHelper.UpdateBudget(qboContextoAuth, existing)); batchEntries.Add(OperationEnum.query, "select * from Budget"); batchEntries.Add(OperationEnum.delete, existing); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.BatchTest <Budget>(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 Budget).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++; } }