public void JournalCodeAddAsyncTestsUsingoAuth(ServiceContext qboContextoAuth) { //Creating the JournalCode for Add JournalCode entity = QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Expenses); JournalCode added = Helper.AddAsync <JournalCode>(qboContextoAuth, entity); }
public void JournalCodeFindbyIdTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the JournalCode for Adding JournalCode journalCode = QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Expenses); //Adding the journalCode JournalCode added = Helper.Add <JournalCode>(qboContextoAuth, journalCode); JournalCode found = Helper.FindById <JournalCode>(qboContextoAuth, added); }
public void AddOthersJournalCodeTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the JournalCode for Add JournalCode journalCode = QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Others); //Adding the JournalCode JournalCode added = Helper.Add <JournalCode>(qboContextoAuth, journalCode); }
[Ignore] //IgnoreReason: Not supported public void JournalCodeVoidAsyncTestsUsingoAuth() { //Creating the JournalCode for Adding JournalCode entity = QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Expenses); //Adding the JournalCode JournalCode added = Helper.Add <JournalCode>(qboContextoAuth, entity); Helper.VoidAsync <JournalCode>(qboContextoAuth, added); }
public void JournalCodeQueryUsingoAuth() { QueryService <JournalCode> entityQuery = new QueryService <JournalCode>(qboContextoAuth); JournalCode existing = Helper.FindOrAdd <JournalCode>(qboContextoAuth, new JournalCode()); List <JournalCode> entities = entityQuery.ExecuteIdsQuery("SELECT * FROM JournalCode where Id='" + existing.Id + "'").ToList <JournalCode>(); //List<JournalCode> entities = entityQuery.Where(c => c.Id == existing.Id).ToList(); Assert.IsTrue(entities.Count() > 0); }
public void JournalCodeFindByIdAsyncTestsUsingoAuth(ServiceContext qboContextoAuth) { //Creating the JournalCode for Adding JournalCode entity = QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Expenses); //Adding the JournalCode JournalCode added = Helper.Add <JournalCode>(qboContextoAuth, entity); //FindById and verify Helper.FindByIdAsync <JournalCode>(qboContextoAuth, added); }
public void AddWagesJournalCodeTestUsingoAuth() { //Creating the JournalCode for Add JournalCode journalCode = QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Wages); //Adding the JournalCode JournalCode added = Helper.Add <JournalCode>(qboContextoAuth, journalCode); //Verify the added Account QBOHelper.VerifyJournalCode(journalCode, added); }
public void JournalCodeSparseUpdateTestUsingoAuth(ServiceContext qboContextoAuth) { //Creating the JournalCode for Adding JournalCode journalCode = QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Expenses); //Adding the JournalCode JournalCode added = Helper.Add <JournalCode>(qboContextoAuth, journalCode); //Change the data of added entity JournalCode changed = QBOHelper.UpdateJournalCodeSparse(qboContextoAuth, added.Id, added.SyncToken); //Update the returned entity data JournalCode updated = Helper.Update <JournalCode>(qboContextoAuth, changed);//Verify the updated JournalCode }
public void JournalCodeUpdatedAsyncTestsUsingoAuth(ServiceContext qboContextoAuth) { //Creating the JournalCode for Adding JournalCode entity = QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Expenses); //Adding the JournalCode JournalCode added = Helper.Add <JournalCode>(qboContextoAuth, entity); //Update the JournalCode JournalCode updated = QBOHelper.UpdateJournalCode(qboContextoAuth, added); //Call the service JournalCode updatedReturned = Helper.UpdateAsync <JournalCode>(qboContextoAuth, updated); }
public void JournalCodeUpdateTestUsingoAuth() { //Creating the JournalCode for Adding JournalCode journalCode = QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Expenses); //Adding the JournalCode JournalCode added = Helper.Add <JournalCode>(qboContextoAuth, journalCode); //Change the data of added entity JournalCode changed = QBOHelper.UpdateJournalCode(qboContextoAuth, added); //Update the returned entity data JournalCode updated = Helper.Update <JournalCode>(qboContextoAuth, changed);//Verify the updated JournalCode QBOHelper.VerifyJournalCode(changed, updated); }
//check #endregion #region Batch public void JournalCodeBatchUsingoAuth(ServiceContext qboContextoAuth) { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); JournalCode existing = Helper.FindOrAdd(qboContextoAuth, new JournalCode()); batchEntries.Add(OperationEnum.create, QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Expenses)); batchEntries.Add(OperationEnum.update, QBOHelper.UpdateJournalCode(qboContextoAuth, existing)); batchEntries.Add(OperationEnum.query, "select * from JournalCode"); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.Batch <JournalCode>(qboContextoAuth, batchEntries); }
[Ignore] //IgnoreReason: Not supported public void JournalCodeVoidTestUsingoAuth() { //Creating the entity for Adding JournalCode entity = QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Expenses); //Adding the entity JournalCode added = Helper.Add <JournalCode>(qboContextoAuth, entity); //Void the returned entity try { JournalCode voided = Helper.Void <JournalCode>(qboContextoAuth, added); Assert.AreEqual(EntityStatusEnum.Voided, voided.status); } catch (IdsException ex) { Assert.Fail(); } }
[Ignore] //IgnoreReason: Not supported public void JournalCodeDeleteTestUsingoAuth() { //Creating the JournalCode for Adding JournalCode journalCode = QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Expenses); //Adding the JournalCode JournalCode added = Helper.Add <JournalCode>(qboContextoAuth, journalCode); //Delete the returned entity try { JournalCode deleted = Helper.Delete <JournalCode>(qboContextoAuth, added); Assert.AreEqual(EntityStatusEnum.Deleted, deleted.status); } catch (IdsException ex) { Assert.Fail(); } }
public void JournalCodeBatchUsingoAuth() { Dictionary <OperationEnum, object> batchEntries = new Dictionary <OperationEnum, object>(); JournalCode existing = Helper.FindOrAdd(qboContextoAuth, new JournalCode()); batchEntries.Add(OperationEnum.create, QBOHelper.CreateJournalCode(qboContextoAuth, JournalCodeTypeEnum.Expenses)); batchEntries.Add(OperationEnum.update, QBOHelper.UpdateJournalCode(qboContextoAuth, existing)); batchEntries.Add(OperationEnum.query, "select * from JournalCode"); ReadOnlyCollection <IntuitBatchResponse> batchResponses = Helper.BatchTest <JournalCode>(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 JournalCode).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++; } }
public void JournalCodeQueryUsingoAuth(ServiceContext qboContextoAuth) { QueryService <JournalCode> entityQuery = new QueryService <JournalCode>(qboContextoAuth); JournalCode existing = Helper.FindOrAdd <JournalCode>(qboContextoAuth, new JournalCode()); List <JournalCode> jc = entityQuery.ExecuteIdsQuery("SELECT * FROM JournalCode where Id='" + existing.Id + "'").ToList <JournalCode>(); }