diff --git a/.github/actions/notify-slack/action.yml b/.github/actions/notify-slack/action.yml
new file mode 100644
index 00000000..add9673f
--- /dev/null
+++ b/.github/actions/notify-slack/action.yml
@@ -0,0 +1,103 @@
+name: slack-alert-action
+description: "Action to send slack payload to public-sdk-events channel"
+
+inputs:
+ heading_text:
+ required: true
+ description: "Heading of the slack payload"
+ alert_type:
+ required: true
+ description: "type of the slack alert"
+ job_status:
+ required: true
+ description: "status of the job"
+ XERO_SLACK_WEBHOOK_URL:
+ required: true
+ description: "webhook url for channel - public-sdk-events"
+ job_url:
+ required: true
+ description: "job run id link"
+ button_type:
+ required: true
+ description: "color for the check logs button"
+ package_version:
+ required: true
+ description: "released package version"
+ repo_link:
+ required: true
+ description: "link of the repo"
+
+
+runs:
+ using: "composite"
+
+ steps:
+
+ - name: Send slack notification
+ id: slack
+ uses: slackapi/slack-github-action@v1.27.0
+ env:
+ SLACK_WEBHOOK_URL: ${{inputs.XERO_SLACK_WEBHOOK_URL}}
+ SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
+ with:
+ payload: |
+ {
+ "blocks": [
+ {
+ "type": "rich_text",
+ "elements": [
+ {
+ "type": "rich_text_section",
+ "elements": [
+ {
+ "type": "text",
+ "text": "${{inputs.heading_text}} ",
+ "style": {
+ "bold": true
+ }
+ },
+ {
+ "type": "emoji",
+ "name": "${{inputs.alert_type}}"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "divider"
+ },
+ {
+ "type": "section",
+ "fields": [
+ {
+ "type": "mrkdwn",
+ "text": "*Repository:* \n ${{inputs.repo_link}}"
+ },
+ {
+ "type": "mrkdwn",
+ "text": "*Status:*\n ${{inputs.job_status}}"
+ },
+ {
+ "type": "mrkdwn",
+ "text": "*Package Version:*\n ${{inputs.package_version}}"
+ }
+ ]
+ },
+ {
+ "type": "actions",
+ "elements": [
+ {
+ "type": "button",
+ "text": {
+ "type": "plain_text",
+ "text": "Check the logs",
+ "emoji": true
+ },
+ "style": "${{inputs.button_type}}",
+ "url": "${{inputs.job_url}}"
+ }
+ ]
+ }
+ ]
+ }
diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml
index fd3d16cf..7628e7d4 100644
--- a/.github/workflows/build-test-lint.yml
+++ b/.github/workflows/build-test-lint.yml
@@ -23,10 +23,32 @@ jobs:
run: dotnet build
working-directory: Xero-NetStandard
+ - name: Check for Outdated Packages
+ run: |
+ dotnet list package --outdated
+ working-directory: Xero-NetStandard
+
# - name: Validate Lint
# run: dotnet format --verify-no-changes
# working-directory: Xero-NetStandard
- # - name: Run Test
- # run: dotnet test
- # working-directory: Xero-NetStandard
\ No newline at end of file
+ - name: Set up Node environment
+ uses: actions/setup-node@v2
+ with:
+ node-version: 20
+
+ - name: Install Prism
+ run: npm install -g @stoplight/prism-cli
+
+ - name: Start PRISM Server
+ run: ./start-prism.sh & sleep 15
+ working-directory: Xero-NetStandard/Xero.NetStandard.OAuth2.Test/util
+
+ - name: Run Test
+ run: dotnet test
+ working-directory: Xero-NetStandard
+
+ - name: Stop PRISM
+ if: success() || failure()
+ run: pkill -f prism
+ working-directory: Xero-NetStandard
\ No newline at end of file
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index 26ed96ca..e338830a 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -9,17 +9,95 @@ jobs:
runs-on: ubuntu-latest
+ outputs:
+ release_number: ${{steps.get_latest_release_number.outputs.release_tag}}
+ permissions:
+ contents: write
+ pull-requests: write
+
steps:
- - uses: actions/checkout@v2
+
+ - name: checkout dotnet repo
+ uses: actions/checkout@v4
+ with:
+ repository: XeroAPI/Xero-NetStandard
+ path: Xero-NetStandard
+
- name: Setup .NET
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v4
with:
- dotnet-version: 3.1.x
+ dotnet-version: '3.1'
+
+
- name: Restore dependencies
run: dotnet restore
+ working-directory: Xero-NetStandard
+
+ - name: Fetch Latest release number
+ id: get_latest_release_number
+ run: |
+ latest_version=$(gh release view --json tagName --jq '.tagName')
+ echo "Latest release version is - $latest_version"
+ echo "::set-output name=release_tag::$latest_version"
+ working-directory: Xero-NetStandard
+ env:
+ GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
+
- name: Build
run: dotnet build --no-restore
+ working-directory: Xero-NetStandard
+
- name: Create Package for Nuget.org\
run: dotnet pack
+ working-directory: Xero-NetStandard
+
- name: Publish Package to Nuget.org
- run: dotnet nuget push ./Xero.NetStandard.OAuth2/bin/Debug/Xero.NetStandard.OAuth2.${{ github.event.release.name }}.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json
+ run: dotnet nuget push ./Xero.NetStandard.OAuth2/bin/Release/Xero.NetStandard.OAuth2.${{ github.event.release.name }}.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json
+ working-directory: Xero-NetStandard
+
+
+ notify-slack-on-success:
+ runs-on: ubuntu-latest
+ needs: build
+ if: success()
+ steps:
+ - name: Checkout Xero-NetStandard repo
+ uses: actions/checkout@v4
+ with:
+ repository: XeroAPI/Xero-NetStandard
+ path: Xero-NetStandard
+
+ - name: Send slack notification on success
+ uses: ./Xero-NetStandard/.github/actions/notify-slack
+ with:
+ heading_text: "Publish job has succeeded !"
+ alert_type: "thumbsup"
+ job_status: "Success"
+ XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}}
+ job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
+ button_type: "primary"
+ package_version: ${{needs.build.outputs.release_number}}
+ repo_link: ${{github.server_url}}/${{github.repository}}
+
+ notify-slack-on-failure:
+ runs-on: ubuntu-latest
+ needs: build
+ if: failure()
+ steps:
+ - name: Checkout Xero-NetStandard repo
+ uses: actions/checkout@v4
+ with:
+ repository: XeroAPI/Xero-NetStandard
+ path: Xero-NetStandard
+
+ - name: Send slack notification on failure
+ uses: ./Xero-NetStandard/.github/actions/notify-slack
+ with:
+ heading_text: "Publish job has failed !"
+ alert_type: "alert"
+ job_status: "Failed"
+ XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}}
+ job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
+ button_type: "danger"
+ package_version: ${{needs.build.outputs.release_number}}
+ repo_link: ${{github.server_url}}/${{github.repository}}
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 00000000..40b03f25
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,5 @@
+
+
+ NU1901,NU1902,NU1903,NU1904,NU1905
+
+
diff --git a/Xero.NetStandard.OAuth2.Test/Api/AccountingApiTests.cs b/Xero.NetStandard.OAuth2.Test/Api/AccountingApiTests.cs
index 29265fa5..4080d373 100755
--- a/Xero.NetStandard.OAuth2.Test/Api/AccountingApiTests.cs
+++ b/Xero.NetStandard.OAuth2.Test/Api/AccountingApiTests.cs
@@ -72,7 +72,7 @@ public async Task DisposeAsync()
public void InstanceTest()
{
// TODO uncomment below to test 'IsInstanceOfType' AccountingApi
- Assert.IsType(typeof(AccountingApi), instance);
+ Assert.IsType(instance);
}
///
@@ -131,7 +131,7 @@ public async Task CreateBankTransactionHistoryRecordTest()
var historyRecordList = new List { historyRecord };
HistoryRecords historyRecords = new HistoryRecords();
historyRecords._HistoryRecords = historyRecordList;
- var response = await instance.CreateBankTransactionHistoryRecordAsync(accessToken, xeroTenantId, bankTransactionID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreateBankTransactionHistoryRecordAsync(accessToken, xeroTenantId, bankTransactionID, historyRecords);
Assert.IsType(response);
}
@@ -171,7 +171,7 @@ public async Task CreateBankTransactionsTest()
};
string idempotencyKey = AutoFaker.Generate();
bool? summarizeErrors = false;
- var response = await instance.CreateBankTransactionsAsync(accessToken, xeroTenantId, bankTransactions, summarizeErrors, null, idempotencyKey ).ConfigureAwait(false);
+ var response = await instance.CreateBankTransactionsAsync(accessToken, xeroTenantId, bankTransactions, summarizeErrors, null, idempotencyKey );
Assert.IsType(response);
}
@@ -226,7 +226,7 @@ public async Task CreateBankTransferTest()
Reference = "SUB 098801"
}
};
- var response = await instance.CreateBankTransferAsync(accessToken, xeroTenantId, bankTransfers).ConfigureAwait(false);
+ var response = await instance.CreateBankTransferAsync(accessToken, xeroTenantId, bankTransfers);
Assert.IsType(response);
}
@@ -255,7 +255,7 @@ public async Task CreateBankTransferHistoryRecordTest()
string xeroTenantId = AutoFaker.Generate();
Guid bankTransferID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreateBankTransferHistoryRecordAsync(accessToken, xeroTenantId, bankTransferID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreateBankTransferHistoryRecordAsync(accessToken, xeroTenantId, bankTransferID, historyRecords);
Assert.IsType(response);
}
@@ -324,7 +324,7 @@ public async Task CreateBatchPaymentTest()
}
};
bool? summarizeErrors = false;
- var response = await instance.CreateBatchPaymentAsync(accessToken, xeroTenantId, batchPayments, summarizeErrors).ConfigureAwait(false);
+ var response = await instance.CreateBatchPaymentAsync(accessToken, xeroTenantId, batchPayments, summarizeErrors);
Assert.IsType(response);
}
@@ -338,7 +338,7 @@ public async Task CreateBatchPaymentHistoryRecordTest()
string xeroTenantId = AutoFaker.Generate();
Guid batchPaymentID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreateBatchPaymentHistoryRecordAsync(accessToken, xeroTenantId, batchPaymentID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreateBatchPaymentHistoryRecordAsync(accessToken, xeroTenantId, batchPaymentID, historyRecords);
Assert.IsType(response);
}
@@ -352,7 +352,7 @@ public async Task CreateBrandingThemePaymentServicesTest()
string xeroTenantId = AutoFaker.Generate();
Guid brandingThemeID = AutoFaker.Generate();
PaymentServices paymentServices = new PaymentServices();
- var response = await instance.CreateBrandingThemePaymentServicesAsync(accessToken, xeroTenantId, brandingThemeID, paymentServices).ConfigureAwait(false);
+ var response = await instance.CreateBrandingThemePaymentServicesAsync(accessToken, xeroTenantId, brandingThemeID, paymentServices);
Assert.IsType(response);
}
@@ -380,7 +380,7 @@ public async Task CreateContactGroupTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
ContactGroups contactGroups = new ContactGroups();
- var response = await instance.CreateContactGroupAsync(accessToken, xeroTenantId, contactGroups).ConfigureAwait(false);
+ var response = await instance.CreateContactGroupAsync(accessToken, xeroTenantId, contactGroups);
Assert.IsType(response);
}
@@ -394,7 +394,7 @@ public async Task CreateContactGroupContactsTest()
string xeroTenantId = AutoFaker.Generate();
Guid contactGroupID = AutoFaker.Generate();
Contacts contacts = new Contacts();
- var response = await instance.CreateContactGroupContactsAsync(accessToken, xeroTenantId, contactGroupID, contacts).ConfigureAwait(false);
+ var response = await instance.CreateContactGroupContactsAsync(accessToken, xeroTenantId, contactGroupID, contacts);
Assert.IsType(response);
}
@@ -408,7 +408,7 @@ public async Task CreateContactHistoryTest()
string xeroTenantId = AutoFaker.Generate();
Guid contactID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreateContactHistoryAsync(accessToken, xeroTenantId, contactID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreateContactHistoryAsync(accessToken, xeroTenantId, contactID, historyRecords);
Assert.IsType(response);
}
@@ -423,7 +423,7 @@ public async Task CreateContactsTest()
Contacts contacts = new Contacts();
string idempotencyKey = AutoFaker.Generate();
bool? summarizeErrors = AutoFaker.Generate();
- var response = await instance.CreateContactsAsync(accessToken, xeroTenantId, contacts, summarizeErrors, idempotencyKey).ConfigureAwait(false);
+ var response = await instance.CreateContactsAsync(accessToken, xeroTenantId, contacts, summarizeErrors, idempotencyKey);
Assert.IsType(response);
}
@@ -437,7 +437,7 @@ public async Task CreateCreditNoteAllocationTest()
string xeroTenantId = AutoFaker.Generate();
Guid creditNoteID = AutoFaker.Generate();
Allocations allocations = new Allocations();
- var response = await instance.CreateCreditNoteAllocationAsync(accessToken, xeroTenantId, creditNoteID, allocations).ConfigureAwait(false);
+ var response = await instance.CreateCreditNoteAllocationAsync(accessToken, xeroTenantId, creditNoteID, allocations);
Assert.IsType(response);
}
@@ -452,7 +452,7 @@ public async Task CreateCreditNoteAllocationTest()
// Guid creditNoteID = AutoFaker.Generate();
// string fileName = AutoFaker.Generate();
// byte[] body = AutoFaker.Generate();
- // var response = await instance.CreateCreditNoteAttachmentByFileNameAsync(accessToken, xeroTenantId, creditNoteID, fileName, body).ConfigureAwait(false);
+ // var response = await instance.CreateCreditNoteAttachmentByFileNameAsync(accessToken, xeroTenantId, creditNoteID, fileName, body);
// Assert.IsType(response);
// }
@@ -466,7 +466,7 @@ public async Task CreateCreditNoteHistoryTest()
string xeroTenantId = AutoFaker.Generate();
Guid creditNoteID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreateCreditNoteHistoryAsync(accessToken, xeroTenantId, creditNoteID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreateCreditNoteHistoryAsync(accessToken, xeroTenantId, creditNoteID, historyRecords);
Assert.IsType(response);
}
@@ -481,7 +481,7 @@ public async Task CreateCreditNotesTest()
CreditNotes creditNotes = new CreditNotes();
string idempotencyKey = AutoFaker.Generate();
bool? summarizeErrors = AutoFaker.Generate();
- var response = await instance.CreateCreditNotesAsync(accessToken, xeroTenantId, creditNotes, summarizeErrors, null, idempotencyKey).ConfigureAwait(false);
+ var response = await instance.CreateCreditNotesAsync(accessToken, xeroTenantId, creditNotes, summarizeErrors, null, idempotencyKey);
Assert.IsType(response);
}
@@ -494,7 +494,7 @@ public async Task CreateCurrencyTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Currency currency = new Currency();
- var response = await instance.CreateCurrencyAsync(accessToken, xeroTenantId, currency).ConfigureAwait(false);
+ var response = await instance.CreateCurrencyAsync(accessToken, xeroTenantId, currency);
Assert.IsType(response);
}
@@ -508,7 +508,7 @@ public async Task CreateEmployeesTest()
string xeroTenantId = AutoFaker.Generate();
Employees employees = new Employees();
employees._Employees = new List { new Employee() };
- var response = await instance.CreateEmployeesAsync(accessToken, xeroTenantId, employees).ConfigureAwait(false);
+ var response = await instance.CreateEmployeesAsync(accessToken, xeroTenantId, employees);
Assert.IsType(response);
}
@@ -522,7 +522,7 @@ public async Task CreateExpenseClaimHistoryTest()
string xeroTenantId = AutoFaker.Generate();
Guid expenseClaimID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreateExpenseClaimHistoryAsync(accessToken, xeroTenantId, expenseClaimID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreateExpenseClaimHistoryAsync(accessToken, xeroTenantId, expenseClaimID, historyRecords);
Assert.IsType(response);
}
@@ -535,7 +535,7 @@ public async Task CreateExpenseClaimsTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
ExpenseClaims expenseClaims = new ExpenseClaims();
- var response = await instance.CreateExpenseClaimsAsync(accessToken, xeroTenantId, expenseClaims).ConfigureAwait(false);
+ var response = await instance.CreateExpenseClaimsAsync(accessToken, xeroTenantId, expenseClaims);
Assert.IsType(response);
}
@@ -564,7 +564,7 @@ public async Task CreateInvoiceHistoryTest()
string xeroTenantId = AutoFaker.Generate();
Guid invoiceID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreateInvoiceHistoryAsync(accessToken, xeroTenantId, invoiceID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreateInvoiceHistoryAsync(accessToken, xeroTenantId, invoiceID, historyRecords);
Assert.IsType(response);
}
@@ -584,7 +584,7 @@ public async Task CreateInvoicesTest()
invoices._Invoices = invList;
string idempotencyKey = AutoFaker.Generate();
bool? summarizeErrors = AutoFaker.Generate();
- var response = await instance.CreateInvoicesAsync(accessToken, xeroTenantId, invoices, summarizeErrors, null, idempotencyKey).ConfigureAwait(false);
+ var response = await instance.CreateInvoicesAsync(accessToken, xeroTenantId, invoices, summarizeErrors, null, idempotencyKey);
Assert.IsType(response);
}
@@ -598,7 +598,7 @@ public async Task CreateItemHistoryTest()
string xeroTenantId = AutoFaker.Generate();
Guid itemID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreateItemHistoryAsync(accessToken, xeroTenantId, itemID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreateItemHistoryAsync(accessToken, xeroTenantId, itemID, historyRecords);
Assert.IsType(response);
}
@@ -613,7 +613,7 @@ public async Task CreateItemsTest()
Items items = new Items();
string idempotencyKey = AutoFaker.Generate();
bool? summarizeErrors = AutoFaker.Generate();
- var response = await instance.CreateItemsAsync(accessToken, xeroTenantId, items, summarizeErrors, null, idempotencyKey).ConfigureAwait(false);
+ var response = await instance.CreateItemsAsync(accessToken, xeroTenantId, items, summarizeErrors, null, idempotencyKey);
Assert.IsType(response);
}
@@ -626,7 +626,7 @@ public async Task CreateLinkedTransactionTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
LinkedTransaction linkedTransaction = new LinkedTransaction();
- var response = await instance.CreateLinkedTransactionAsync(accessToken, xeroTenantId, linkedTransaction).ConfigureAwait(false);
+ var response = await instance.CreateLinkedTransactionAsync(accessToken, xeroTenantId, linkedTransaction);
Assert.IsType(response);
}
@@ -672,7 +672,7 @@ public async Task CreateManualJournalsTest()
Date = DateTime.Now,
},
};
- var response = await instance.CreateManualJournalsAsync(accessToken, xeroTenantId, manualJournals).ConfigureAwait(false);
+ var response = await instance.CreateManualJournalsAsync(accessToken, xeroTenantId, manualJournals);
Assert.IsType(response);
}
@@ -702,7 +702,7 @@ public async Task CreateOverpaymentAllocationsTest()
Guid overpaymentID = AutoFaker.Generate();
Allocations allocations = new Allocations();
allocations._Allocations = new List { new Allocation() };
- var response = await instance.CreateOverpaymentAllocationsAsync(accessToken, xeroTenantId, overpaymentID, allocations).ConfigureAwait(false);
+ var response = await instance.CreateOverpaymentAllocationsAsync(accessToken, xeroTenantId, overpaymentID, allocations);
Assert.IsType(response);
}
@@ -730,7 +730,7 @@ public async Task CreateOverpaymentHistoryTest()
string xeroTenantId = AutoFaker.Generate();
Guid overpaymentID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreateOverpaymentHistoryAsync(accessToken, xeroTenantId, overpaymentID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreateOverpaymentHistoryAsync(accessToken, xeroTenantId, overpaymentID, historyRecords);
Assert.IsType(response);
}
@@ -743,7 +743,7 @@ public async Task CreatePaymentTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Payment payment = new Payment();
- var response = await instance.CreatePaymentAsync(accessToken, xeroTenantId, payment).ConfigureAwait(false);
+ var response = await instance.CreatePaymentAsync(accessToken, xeroTenantId, payment);
Assert.IsType(response);
}
@@ -757,7 +757,7 @@ public async Task CreatePaymentHistoryTest()
string xeroTenantId = AutoFaker.Generate();
Guid paymentID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreatePaymentHistoryAsync(accessToken, xeroTenantId, paymentID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreatePaymentHistoryAsync(accessToken, xeroTenantId, paymentID, historyRecords);
Assert.IsType(response);
}
@@ -770,7 +770,7 @@ public async Task CreatePaymentServiceTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
PaymentServices paymentServices = new PaymentServices();
- var response = await instance.CreatePaymentServiceAsync(accessToken, xeroTenantId, paymentServices).ConfigureAwait(false);
+ var response = await instance.CreatePaymentServiceAsync(accessToken, xeroTenantId, paymentServices);
Assert.IsType(response);
}
@@ -783,7 +783,7 @@ public async Task CreatePaymentsTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Payments payments = new Payments();
- var response = await instance.CreatePaymentsAsync(accessToken, xeroTenantId, payments).ConfigureAwait(false);
+ var response = await instance.CreatePaymentsAsync(accessToken, xeroTenantId, payments);
Assert.IsType(response);
}
@@ -797,7 +797,7 @@ public async Task CreatePrepaymentAllocationsTest()
string xeroTenantId = AutoFaker.Generate();
Guid prepaymentID = AutoFaker.Generate();
Allocations allocations = new Allocations();
- var response = await instance.CreatePrepaymentAllocationsAsync(accessToken, xeroTenantId, prepaymentID, allocations).ConfigureAwait(false);
+ var response = await instance.CreatePrepaymentAllocationsAsync(accessToken, xeroTenantId, prepaymentID, allocations);
Assert.IsType(response);
}
@@ -811,7 +811,7 @@ public async Task CreatePrepaymentHistoryTest()
string xeroTenantId = AutoFaker.Generate();
Guid prepaymentID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreatePrepaymentHistoryAsync(accessToken, xeroTenantId, prepaymentID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreatePrepaymentHistoryAsync(accessToken, xeroTenantId, prepaymentID, historyRecords);
Assert.IsType(response);
}
@@ -825,7 +825,7 @@ public async Task CreatePurchaseOrderHistoryTest()
string xeroTenantId = AutoFaker.Generate();
Guid purchaseOrderID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreatePurchaseOrderHistoryAsync(accessToken, xeroTenantId, purchaseOrderID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreatePurchaseOrderHistoryAsync(accessToken, xeroTenantId, purchaseOrderID, historyRecords);
Assert.IsType(response);
}
@@ -840,7 +840,7 @@ public async Task CreatePurchaseOrdersTest()
PurchaseOrders purchaseOrders = new PurchaseOrders();
string idempotencyKey = AutoFaker.Generate();
bool? summarizeErrors = AutoFaker.Generate();
- var response = await instance.CreatePurchaseOrdersAsync(accessToken, xeroTenantId, purchaseOrders, summarizeErrors, idempotencyKey).ConfigureAwait(false);
+ var response = await instance.CreatePurchaseOrdersAsync(accessToken, xeroTenantId, purchaseOrders, summarizeErrors, idempotencyKey);
Assert.IsType(response);
}
@@ -853,7 +853,7 @@ public async Task CreateReceiptTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Receipts receipts = new Receipts();
- var response = await instance.CreateReceiptAsync(accessToken, xeroTenantId, receipts).ConfigureAwait(false);
+ var response = await instance.CreateReceiptAsync(accessToken, xeroTenantId, receipts);
Assert.IsType(response);
}
@@ -882,7 +882,7 @@ public async Task CreateReceiptHistoryTest()
string xeroTenantId = AutoFaker.Generate();
Guid receiptID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreateReceiptHistoryAsync(accessToken, xeroTenantId, receiptID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreateReceiptHistoryAsync(accessToken, xeroTenantId, receiptID, historyRecords);
Assert.IsType(response);
}
@@ -911,7 +911,7 @@ public async Task CreateRepeatingInvoiceHistoryTest()
string xeroTenantId = AutoFaker.Generate();
Guid repeatingInvoiceID = AutoFaker.Generate();
HistoryRecords historyRecords = new HistoryRecords();
- var response = await instance.CreateRepeatingInvoiceHistoryAsync(accessToken, xeroTenantId, repeatingInvoiceID, historyRecords).ConfigureAwait(false);
+ var response = await instance.CreateRepeatingInvoiceHistoryAsync(accessToken, xeroTenantId, repeatingInvoiceID, historyRecords);
Assert.IsType(response);
}
@@ -924,7 +924,7 @@ public async Task CreateTaxRatesTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
TaxRates taxRates = new TaxRates();
- var response = await instance.CreateTaxRatesAsync(accessToken, xeroTenantId, taxRates).ConfigureAwait(false);
+ var response = await instance.CreateTaxRatesAsync(accessToken, xeroTenantId, taxRates);
Assert.IsType(response);
}
@@ -937,7 +937,7 @@ public async Task CreateTrackingCategoryTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
TrackingCategory trackingCategory = new TrackingCategory();
- var response = await instance.CreateTrackingCategoryAsync(accessToken, xeroTenantId, trackingCategory).ConfigureAwait(false);
+ var response = await instance.CreateTrackingCategoryAsync(accessToken, xeroTenantId, trackingCategory);
Assert.IsType(response);
}
@@ -951,7 +951,7 @@ public async Task CreateTrackingOptionsTest()
string xeroTenantId = AutoFaker.Generate();
Guid trackingCategoryID = AutoFaker.Generate();
TrackingOption trackingOption = new TrackingOption();
- var response = await instance.CreateTrackingOptionsAsync(accessToken, xeroTenantId, trackingCategoryID, trackingOption).ConfigureAwait(false);
+ var response = await instance.CreateTrackingOptionsAsync(accessToken, xeroTenantId, trackingCategoryID, trackingOption);
Assert.IsType(response);
}
@@ -964,7 +964,7 @@ public async Task DeleteAccountTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid accountID = AutoFaker.Generate();
- var response = await instance.DeleteAccountAsync(accessToken, xeroTenantId, accountID).ConfigureAwait(false);
+ var response = await instance.DeleteAccountAsync(accessToken, xeroTenantId, accountID);
Assert.IsType(response);
}
@@ -978,7 +978,7 @@ public async Task DeleteContactGroupContactTest()
string xeroTenantId = AutoFaker.Generate();
Guid contactGroupID = AutoFaker.Generate();
Guid contactID = AutoFaker.Generate();
- await instance.DeleteContactGroupContactAsync(accessToken, xeroTenantId, contactGroupID, contactID).ConfigureAwait(false);
+ await instance.DeleteContactGroupContactAsync(accessToken, xeroTenantId, contactGroupID, contactID);
}
@@ -991,7 +991,7 @@ public async Task DeleteContactGroupContactsTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid contactGroupID = AutoFaker.Generate();
- await instance.DeleteContactGroupContactsAsync(accessToken, xeroTenantId, contactGroupID).ConfigureAwait(false);
+ await instance.DeleteContactGroupContactsAsync(accessToken, xeroTenantId, contactGroupID);
}
@@ -1004,7 +1004,7 @@ public async Task DeleteItemTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid itemID = AutoFaker.Generate();
- await instance.DeleteItemAsync(accessToken, xeroTenantId, itemID).ConfigureAwait(false);
+ await instance.DeleteItemAsync(accessToken, xeroTenantId, itemID);
}
@@ -1017,7 +1017,7 @@ public async Task DeleteLinkedTransactionTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid linkedTransactionID = AutoFaker.Generate();
- await instance.DeleteLinkedTransactionAsync(accessToken, xeroTenantId, linkedTransactionID).ConfigureAwait(false);
+ await instance.DeleteLinkedTransactionAsync(accessToken, xeroTenantId, linkedTransactionID);
}
@@ -1035,7 +1035,7 @@ public async Task DeletePaymentTest()
{
Status = "DELETED",
};
- var response = await instance.DeletePaymentAsync(accessToken, xeroTenantId, paymentID, paymentDelete).ConfigureAwait(false);
+ var response = await instance.DeletePaymentAsync(accessToken, xeroTenantId, paymentID, paymentDelete);
Assert.IsType(response);
}
@@ -1048,7 +1048,7 @@ public async Task DeleteTrackingCategoryTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid trackingCategoryID = AutoFaker.Generate();
- var response = await instance.DeleteTrackingCategoryAsync(accessToken, xeroTenantId, trackingCategoryID).ConfigureAwait(false);
+ var response = await instance.DeleteTrackingCategoryAsync(accessToken, xeroTenantId, trackingCategoryID);
Assert.IsType(response);
}
@@ -1062,7 +1062,7 @@ public async Task DeleteTrackingOptionsTest()
string xeroTenantId = AutoFaker.Generate();
Guid trackingCategoryID = AutoFaker.Generate();
Guid trackingOptionID = AutoFaker.Generate();
- var response = await instance.DeleteTrackingOptionsAsync(accessToken, xeroTenantId, trackingCategoryID, trackingOptionID).ConfigureAwait(false);
+ var response = await instance.DeleteTrackingOptionsAsync(accessToken, xeroTenantId, trackingCategoryID, trackingOptionID);
Assert.IsType(response);
}
@@ -1076,7 +1076,7 @@ public async Task EmailInvoiceTest()
string xeroTenantId = AutoFaker.Generate();
Guid invoiceID = AutoFaker.Generate();
RequestEmpty requestEmpty = new RequestEmpty();
- await instance.EmailInvoiceAsync(accessToken, xeroTenantId, invoiceID, requestEmpty).ConfigureAwait(false);
+ await instance.EmailInvoiceAsync(accessToken, xeroTenantId, invoiceID, requestEmpty);
}
@@ -1089,7 +1089,7 @@ public async Task GetAccountTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid accountID = AutoFaker.Generate();
- var response = await instance.GetAccountAsync(accessToken, xeroTenantId, accountID).ConfigureAwait(false);
+ var response = await instance.GetAccountAsync(accessToken, xeroTenantId, accountID);
Assert.IsType(response);
}
@@ -1150,7 +1150,7 @@ public async Task GetAccountsTest()
DateTime? ifModifiedSince = AutoFaker.Generate();
string where = AutoFaker.Generate();
string order = AutoFaker.Generate();
- var response = await instance.GetAccountsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order).ConfigureAwait(false);
+ var response = await instance.GetAccountsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order);
Assert.IsType(response);
}
@@ -1163,7 +1163,7 @@ public async Task GetBankTransactionTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid bankTransactionID = AutoFaker.Generate();
- var response = await instance.GetBankTransactionAsync(accessToken, xeroTenantId, bankTransactionID).ConfigureAwait(false);
+ var response = await instance.GetBankTransactionAsync(accessToken, xeroTenantId, bankTransactionID);
Assert.IsType(response);
}
@@ -1223,7 +1223,7 @@ public async Task GetBankTransactionsTest()
string order = AutoFaker.Generate();
int? page = AutoFaker.Generate();
int? unitdp = AutoFaker.Generate();
- var response = await instance.GetBankTransactionsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp).ConfigureAwait(false);
+ var response = await instance.GetBankTransactionsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp);
Assert.IsType(response);
}
@@ -1236,7 +1236,7 @@ public async Task GetBankTransactionsHistoryTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid bankTransactionID = AutoFaker.Generate();
- var response = await instance.GetBankTransactionsHistoryAsync(accessToken, xeroTenantId, bankTransactionID).ConfigureAwait(false);
+ var response = await instance.GetBankTransactionsHistoryAsync(accessToken, xeroTenantId, bankTransactionID);
Assert.IsType(response);
}
@@ -1249,7 +1249,7 @@ public async Task GetBankTransferTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid bankTransferID = AutoFaker.Generate();
- var response = await instance.GetBankTransferAsync(accessToken, xeroTenantId, bankTransferID).ConfigureAwait(false);
+ var response = await instance.GetBankTransferAsync(accessToken, xeroTenantId, bankTransferID);
Assert.IsType(response);
}
@@ -1305,7 +1305,7 @@ public async Task GetBankTransferHistoryTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid bankTransferID = AutoFaker.Generate();
- var response = await instance.GetBankTransferHistoryAsync(accessToken, xeroTenantId, bankTransferID).ConfigureAwait(false);
+ var response = await instance.GetBankTransferHistoryAsync(accessToken, xeroTenantId, bankTransferID);
Assert.IsType(response);
}
@@ -1320,7 +1320,7 @@ public async Task GetBankTransfersTest()
DateTime? ifModifiedSince = AutoFaker.Generate();
string where = AutoFaker.Generate();
string order = AutoFaker.Generate();
- var response = await instance.GetBankTransfersAsync(accessToken, xeroTenantId, ifModifiedSince, where, order).ConfigureAwait(false);
+ var response = await instance.GetBankTransfersAsync(accessToken, xeroTenantId, ifModifiedSince, where, order);
Assert.IsType(response);
}
@@ -1333,7 +1333,7 @@ public async Task GetBatchPaymentHistoryTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid batchPaymentID = AutoFaker.Generate();
- var response = await instance.GetBatchPaymentHistoryAsync(accessToken, xeroTenantId, batchPaymentID).ConfigureAwait(false);
+ var response = await instance.GetBatchPaymentHistoryAsync(accessToken, xeroTenantId, batchPaymentID);
Assert.IsType(response);
}
@@ -1348,7 +1348,7 @@ public async Task GetBatchPaymentsTest()
DateTime? ifModifiedSince = AutoFaker.Generate();
string where = AutoFaker.Generate();
string order = AutoFaker.Generate();
- var response = await instance.GetBatchPaymentsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order).ConfigureAwait(false);
+ var response = await instance.GetBatchPaymentsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order);
Assert.IsType(response);
}
@@ -1361,7 +1361,7 @@ public async Task GetBrandingThemeTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid brandingThemeID = AutoFaker.Generate();
- var response = await instance.GetBrandingThemeAsync(accessToken, xeroTenantId, brandingThemeID).ConfigureAwait(false);
+ var response = await instance.GetBrandingThemeAsync(accessToken, xeroTenantId, brandingThemeID);
Assert.IsType(response);
}
@@ -1374,7 +1374,7 @@ public async Task GetBrandingThemePaymentServicesTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid brandingThemeID = AutoFaker.Generate();
- var response = await instance.GetBrandingThemePaymentServicesAsync(accessToken, xeroTenantId, brandingThemeID).ConfigureAwait(false);
+ var response = await instance.GetBrandingThemePaymentServicesAsync(accessToken, xeroTenantId, brandingThemeID);
Assert.IsType(response);
}
@@ -1386,7 +1386,7 @@ public async Task GetBrandingThemesTest()
{
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
- var response = await instance.GetBrandingThemesAsync(accessToken, xeroTenantId).ConfigureAwait(false);
+ var response = await instance.GetBrandingThemesAsync(accessToken, xeroTenantId);
Assert.IsType(response);
}
@@ -1399,7 +1399,7 @@ public async Task GetContactTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid contactID = AutoFaker.Generate();
- var response = await instance.GetContactAsync(accessToken, xeroTenantId, contactID).ConfigureAwait(false);
+ var response = await instance.GetContactAsync(accessToken, xeroTenantId, contactID);
Assert.IsType(response);
}
@@ -1455,7 +1455,7 @@ public async Task GetContactCISSettingsTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid contactID = Guid.NewGuid();
- var response = await instance.GetContactCISSettingsAsync(accessToken, xeroTenantId, contactID).ConfigureAwait(false);
+ var response = await instance.GetContactCISSettingsAsync(accessToken, xeroTenantId, contactID);
Assert.IsType(response);
}
@@ -1468,7 +1468,7 @@ public async Task GetContactGroupTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid contactGroupID = AutoFaker.Generate();
- var response = await instance.GetContactGroupAsync(accessToken, xeroTenantId, contactGroupID).ConfigureAwait(false);
+ var response = await instance.GetContactGroupAsync(accessToken, xeroTenantId, contactGroupID);
Assert.IsType(response);
}
@@ -1482,7 +1482,7 @@ public async Task GetContactGroupsTest()
string xeroTenantId = AutoFaker.Generate();
string where = AutoFaker.Generate();
string order = AutoFaker.Generate();
- var response = await instance.GetContactGroupsAsync(accessToken, xeroTenantId, where, order).ConfigureAwait(false);
+ var response = await instance.GetContactGroupsAsync(accessToken, xeroTenantId, where, order);
Assert.IsType(response);
}
@@ -1495,7 +1495,7 @@ public async Task GetContactHistoryTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid contactID = AutoFaker.Generate();
- var response = await instance.GetContactHistoryAsync(accessToken, xeroTenantId, contactID).ConfigureAwait(false);
+ var response = await instance.GetContactHistoryAsync(accessToken, xeroTenantId, contactID);
Assert.IsType(response);
}
@@ -1513,7 +1513,7 @@ public async Task GetContactsTest()
List iDs = AutoFaker.Generate>();
int? page = AutoFaker.Generate();
bool? includeArchived = AutoFaker.Generate();
- var response = await instance.GetContactsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, iDs, page, includeArchived).ConfigureAwait(false);
+ var response = await instance.GetContactsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, iDs, page, includeArchived);
Assert.IsType(response);
}
@@ -1526,7 +1526,7 @@ public async Task GetCreditNoteTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid creditNoteID = AutoFaker.Generate();
- var response = await instance.GetCreditNoteAsync(accessToken, xeroTenantId, creditNoteID).ConfigureAwait(false);
+ var response = await instance.GetCreditNoteAsync(accessToken, xeroTenantId, creditNoteID);
Assert.IsType(response);
}
@@ -1540,8 +1540,8 @@ public async Task GetCreditNoteAsPdfTest()
string xeroTenantId = AutoFaker.Generate();
Guid creditNoteID = AutoFaker.Generate();
// string contentType = AutoFaker.Generate();
- var response = await instance.GetCreditNoteAsPdfAsync(accessToken, xeroTenantId, creditNoteID).ConfigureAwait(false);
- Assert.IsType(response);
+ var response = await instance.GetCreditNoteAsPdfAsync(accessToken, xeroTenantId, creditNoteID);
+ Assert.IsAssignableFrom(response);
}
// ///
@@ -1596,7 +1596,7 @@ public async Task GetCreditNoteHistoryTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid creditNoteID = AutoFaker.Generate();
- var response = await instance.GetCreditNoteHistoryAsync(accessToken, xeroTenantId, creditNoteID).ConfigureAwait(false);
+ var response = await instance.GetCreditNoteHistoryAsync(accessToken, xeroTenantId, creditNoteID);
Assert.IsType(response);
}
@@ -1612,7 +1612,7 @@ public async Task GetCreditNotesTest()
string where = AutoFaker.Generate();
string order = AutoFaker.Generate();
int? page = AutoFaker.Generate();
- var response = await instance.GetCreditNotesAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, page).ConfigureAwait(false);
+ var response = await instance.GetCreditNotesAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
Assert.IsType(response);
}
@@ -1626,7 +1626,7 @@ public async Task GetCurrenciesTest()
string xeroTenantId = AutoFaker.Generate();
string where = AutoFaker.Generate();
string order = AutoFaker.Generate();
- var response = await instance.GetCurrenciesAsync(accessToken, xeroTenantId, where, order).ConfigureAwait(false);
+ var response = await instance.GetCurrenciesAsync(accessToken, xeroTenantId, where, order);
Assert.IsType(response);
}
@@ -1639,7 +1639,7 @@ public async Task GetEmployeeTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid employeeID = AutoFaker.Generate();
- var response = await instance.GetEmployeeAsync(accessToken, xeroTenantId, employeeID).ConfigureAwait(false);
+ var response = await instance.GetEmployeeAsync(accessToken, xeroTenantId, employeeID);
Assert.IsType(response);
}
@@ -1654,7 +1654,7 @@ public async Task GetEmployeesTest()
DateTime? ifModifiedSince = AutoFaker.Generate();
string where = AutoFaker.Generate();
string order = AutoFaker.Generate();
- var response = await instance.GetEmployeesAsync(accessToken, xeroTenantId, ifModifiedSince, where, order).ConfigureAwait(false);
+ var response = await instance.GetEmployeesAsync(accessToken, xeroTenantId, ifModifiedSince, where, order);
Assert.IsType(response);
}
@@ -1667,7 +1667,7 @@ public async Task GetExpenseClaimTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid expenseClaimID = AutoFaker.Generate();
- var response = await instance.GetExpenseClaimAsync(accessToken, xeroTenantId, expenseClaimID).ConfigureAwait(false);
+ var response = await instance.GetExpenseClaimAsync(accessToken, xeroTenantId, expenseClaimID);
Assert.IsType(response);
}
@@ -1680,7 +1680,7 @@ public async Task GetExpenseClaimHistoryTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid expenseClaimID = AutoFaker.Generate();
- var response = await instance.GetExpenseClaimHistoryAsync(accessToken, xeroTenantId, expenseClaimID).ConfigureAwait(false);
+ var response = await instance.GetExpenseClaimHistoryAsync(accessToken, xeroTenantId, expenseClaimID);
Assert.IsType(response);
}
@@ -1695,7 +1695,7 @@ public async Task GetExpenseClaimsTest()
DateTime? ifModifiedSince = AutoFaker.Generate();
string where = AutoFaker.Generate();
string order = AutoFaker.Generate();
- var response = await instance.GetExpenseClaimsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order).ConfigureAwait(false);
+ var response = await instance.GetExpenseClaimsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order);
Assert.IsType(response);
}
@@ -1708,7 +1708,7 @@ public async Task GetInvoiceTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid invoiceID = AutoFaker.Generate();
- var response = await instance.GetInvoiceAsync(accessToken, xeroTenantId, invoiceID).ConfigureAwait(false);
+ var response = await instance.GetInvoiceAsync(accessToken, xeroTenantId, invoiceID);
Assert.IsType>(response._Invoices);
}
@@ -1720,7 +1720,7 @@ public async Task GetInvoiceUpdatedDateUtcTest()
{
string xeroTenantId = AutoFaker.Generate();
Guid invoiceID = AutoFaker.Generate();
- var response = await instance.GetInvoiceAsync(accessToken, xeroTenantId, invoiceID).ConfigureAwait(false);
+ var response = await instance.GetInvoiceAsync(accessToken, xeroTenantId, invoiceID);
DateTime actualTime = response._Invoices[0].UpdatedDateUTC.Value;
DateTime expectedTime = new DateTime(2019, 3, 7, 17, 59, 28, 133);
Assert.Equal(expectedTime, actualTime);
@@ -1736,8 +1736,8 @@ public async Task GetInvoiceAsPdfTest()
string xeroTenantId = AutoFaker.Generate();
Guid invoiceID = AutoFaker.Generate();
// string contentType = AutoFaker.Generate();
- var response = await instance.GetInvoiceAsPdfAsync(accessToken, xeroTenantId, invoiceID).ConfigureAwait(false);
- Assert.IsType(response);
+ var response = await instance.GetInvoiceAsPdfAsync(accessToken, xeroTenantId, invoiceID);
+ Assert.IsAssignableFrom(response);
}
// ///
@@ -1751,7 +1751,7 @@ public async Task GetInvoiceAsPdfTest()
// Guid invoiceID = AutoFaker.Generate();
// string fileName = AutoFaker.Generate();
// string contentType = AutoFaker.Generate();
- // var response = await instance.GetInvoiceAttachmentByFileNameAsync(accessToken, xeroTenantId, invoiceID, fileName, contentType).ConfigureAwait(false);
+ // var response = await instance.GetInvoiceAttachmentByFileNameAsync(accessToken, xeroTenantId, invoiceID, fileName, contentType);
// Assert.IsType(response);
// }
@@ -1766,7 +1766,7 @@ public async Task GetInvoiceAsPdfTest()
// Guid invoiceID = AutoFaker.Generate();
// Guid attachmentID = AutoFaker.Generate();
// string contentType = AutoFaker.Generate();
- // var response = await instance.GetInvoiceAttachmentByIdAsync(accessToken, xeroTenantId, invoiceID, attachmentID, contentType).ConfigureAwait(false);
+ // var response = await instance.GetInvoiceAttachmentByIdAsync(accessToken, xeroTenantId, invoiceID, attachmentID, contentType);
// Assert.IsType(response);
// }
@@ -1792,7 +1792,7 @@ public async Task GetInvoiceHistoryTest()
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
Guid invoiceID = AutoFaker.Generate();
- var response = await instance.GetInvoiceHistoryAsync(accessToken, xeroTenantId, invoiceID).ConfigureAwait(false);
+ var response = await instance.GetInvoiceHistoryAsync(accessToken, xeroTenantId, invoiceID);
Assert.IsType(response);
}
@@ -1804,7 +1804,7 @@ public async Task GetInvoiceRemindersTest()
{
// TODO uncomment below to test the method and replace null with proper value
string xeroTenantId = AutoFaker.Generate();
- var response = await instance.GetInvoiceRemindersAsync(accessToken, xeroTenantId).ConfigureAwait(false);
+ var response = await instance.GetInvoiceRemindersAsync(accessToken, xeroTenantId);
Assert.IsType(response);
}
@@ -1827,7 +1827,7 @@ public async Task GetInvoicesTest()
bool? includeArchived = AutoFaker.Generate();
bool? createdByMyApp = AutoFaker.Generate