public void CustomerMsgQueryUsingoAuth() { QueryService <CustomerMsg> entityQuery = new QueryService <CustomerMsg>(qboContextoAuth); CustomerMsg existing = Helper.FindOrAdd <CustomerMsg>(qboContextoAuth, new CustomerMsg()); List <CustomerMsg> entities = entityQuery.Where(c => c.Id == existing.Id).ToList(); Assert.IsTrue(entities.Count() > 0); }
public void CustomerMsgVoidAsyncTestsUsingoAuth() { //Creating the CustomerMsg for Adding CustomerMsg entity = QBOHelper.CreateCustomerMsg(qboContextoAuth); //Adding the CustomerMsg CustomerMsg added = Helper.Add <CustomerMsg>(qboContextoAuth, entity); Helper.VoidAsync <CustomerMsg>(qboContextoAuth, added); }
public void CustomerMsgAddAsyncTestsUsingoAuth() { //Creating the CustomerMsg for Add CustomerMsg entity = QBOHelper.CreateCustomerMsg(qboContextoAuth); CustomerMsg added = Helper.AddAsync <CustomerMsg>(qboContextoAuth, entity); QBOHelper.VerifyCustomerMsg(entity, added); }
public void CustomerMsgQueryUsingoAuth() { QueryService <CustomerMsg> entityQuery = new QueryService <CustomerMsg>(qboContextoAuth); CustomerMsg existing = Helper.FindOrAdd <CustomerMsg>(qboContextoAuth, new CustomerMsg()); //<CustomerMsg> entities = entityQuery.Where(c => c.Id == existing.Id).ToList(); int count = entityQuery.ExecuteIdsQuery("Select * from CustomerMsg where Id='" + existing.Id + "'").Count; Assert.IsTrue(count > 0); }
public void CustomerMsgFindbyIdTestUsingoAuth() { //Creating the CustomerMsg for Adding CustomerMsg customerMsg = QBOHelper.CreateCustomerMsg(qboContextoAuth); //Adding the CustomerMsg CustomerMsg added = Helper.Add <CustomerMsg>(qboContextoAuth, customerMsg); CustomerMsg found = Helper.FindById <CustomerMsg>(qboContextoAuth, added); QBOHelper.VerifyCustomerMsg(found, added); }
public void CustomerMsgAddTestUsingoAuth() { //Creating the CustomerMsg for Add CustomerMsg customerMsg = QBOHelper.CreateCustomerMsg(qboContextoAuth); //Adding the CustomerMsg CustomerMsg added = Helper.Add <CustomerMsg>(qboContextoAuth, customerMsg); //Verify the added CustomerMsg QBOHelper.VerifyCustomerMsg(customerMsg, added); }
public void CustomerMsgUpdateTestUsingoAuth() { //Creating the CustomerMsg for Adding CustomerMsg customerMsg = QBOHelper.CreateCustomerMsg(qboContextoAuth); //Adding the CustomerMsg CustomerMsg added = Helper.Add <CustomerMsg>(qboContextoAuth, customerMsg); //Change the data of added entity CustomerMsg changed = QBOHelper.UpdateCustomerMsg(qboContextoAuth, added); //Update the returned entity data CustomerMsg updated = Helper.Update <CustomerMsg>(qboContextoAuth, changed);//Verify the updated CustomerMsg QBOHelper.VerifyCustomerMsg(changed, updated); }
public void CustomerMsgUpdatedAsyncTestsUsingoAuth() { //Creating the CustomerMsg for Adding CustomerMsg entity = QBOHelper.CreateCustomerMsg(qboContextoAuth); //Adding the CustomerMsg CustomerMsg added = Helper.Add <CustomerMsg>(qboContextoAuth, entity); //Update the CustomerMsg CustomerMsg updated = QBOHelper.UpdateCustomerMsg(qboContextoAuth, added); //Call the service CustomerMsg updatedReturned = Helper.UpdateAsync <CustomerMsg>(qboContextoAuth, updated); //Verify updated CustomerMsg QBOHelper.VerifyCustomerMsg(updated, updatedReturned); }
public void CustomerMsgVoidTestUsingoAuth() { //Creating the entity for Adding CustomerMsg entity = QBOHelper.CreateCustomerMsg(qboContextoAuth); //Adding the entity CustomerMsg added = Helper.Add <CustomerMsg>(qboContextoAuth, entity); //Void the returned entity try { CustomerMsg voided = Helper.Void <CustomerMsg>(qboContextoAuth, added); Assert.AreEqual(EntityStatusEnum.Voided, voided.status); } catch (IdsException ex) { Assert.Fail(); } }
public void CustomerMsgDeleteTestUsingoAuth() { //Creating the CustomerMsg for Adding CustomerMsg customerMsg = QBOHelper.CreateCustomerMsg(qboContextoAuth); //Adding the CustomerMsg CustomerMsg added = Helper.Add <CustomerMsg>(qboContextoAuth, customerMsg); //Delete the returned entity try { CustomerMsg deleted = Helper.Delete <CustomerMsg>(qboContextoAuth, added); Assert.AreEqual(EntityStatusEnum.Deleted, deleted.status); } catch (IdsException ex) { Assert.Fail(); } }
public void CustomerMsgBatchUsingoAuth() { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); CustomerMsg existing = Helper.FindOrAdd(qboContextoAuth, new CustomerMsg()); batchEntries.Add(OperationEnum.create, QBOHelper.CreateCustomerMsg(qboContextoAuth)); batchEntries.Add(OperationEnum.update, QBOHelper.UpdateCustomerMsg(qboContextoAuth, existing)); batchEntries.Add(OperationEnum.query, "select * from CustomerMsg"); batchEntries.Add(OperationEnum.delete, existing); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.BatchTest <CustomerMsg>(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 CustomerMsg).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++; } }