Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test names #315

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FortnoxSDK.Tests/ConnectorTests/AbsenceTransactionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_AbsenceTransaction_Find()
{
#region Arrange
var tmpEmployee = await TestUtils.GetBasicTestEmployee();
Expand Down
2 changes: 1 addition & 1 deletion FortnoxSDK.Tests/ConnectorTests/AccountChartTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
public FortnoxClient FortnoxClient = TestUtils.DefaultFortnoxClient;

[TestMethod]
public async Task Test_AccountChart_CRUD()

Check warning on line 14 in FortnoxSDK.Tests/ConnectorTests/AccountChartTests.cs

View workflow job for this annotation

GitHub Actions / build

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
//Not supported
}

[TestMethod]
public async Task Test_Find()
public async Task Test_AccountChart_Find()
{
var connector = FortnoxClient.AccountChartConnector;

Expand Down
2 changes: 1 addition & 1 deletion FortnoxSDK.Tests/ConnectorTests/AccountTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_Account_Find()
{
#region Arrange
//Add code to create required resources
Expand Down
2 changes: 1 addition & 1 deletion FortnoxSDK.Tests/ConnectorTests/ArticleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_Article_Find()
{
#region Arrange
//Add code to create required resources
Expand Down
2 changes: 1 addition & 1 deletion FortnoxSDK.Tests/ConnectorTests/AssetTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_Asset_Find()
{
#region Arrange
var tmpCostCenter = await FortnoxClient.CostCenterConnector.CreateAsync(new CostCenter() { Code = "TMPCC", Description = "TempCostCenter" });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_AttendanceTransactions_Find()
{
#region Arrange
var tmpEmployee = await TestUtils.GetBasicTestEmployee();
Expand Down
2 changes: 1 addition & 1 deletion FortnoxSDK.Tests/ConnectorTests/CostCenterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_CostCenter_Find()
{
#region Arrange
//Add code to create required resources
Expand Down
4 changes: 2 additions & 2 deletions FortnoxSDK.Tests/ConnectorTests/CustomerReferenceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_CustomerReference_Find()
{
#region Arrange
var tmpCustomer = await FortnoxClient.CustomerConnector.CreateAsync(new Customer() { Name = "TestCustomer" });
Expand Down Expand Up @@ -115,7 +115,7 @@ public async Task Test_Find()

// Requires at least 101 customer references to exist in data source
[TestMethod]
public async Task Test_Find_Unlimited()
public async Task Test_CustomerReference_Find_Unlimited()
{
var connector = FortnoxClient.CustomerReferenceConnector;

Expand Down
2 changes: 1 addition & 1 deletion FortnoxSDK.Tests/ConnectorTests/CustomerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_Customer_Find()
{
#region Arrange
//Add code to create required resources
Expand Down
12 changes: 6 additions & 6 deletions FortnoxSDK.Tests/ConnectorTests/InvoiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public async Task Test_Invoice_CRUD()
}

[TestMethod]
public async Task Test_Find()
public async Task Test_Invoice_Find()
{
#region Arrange
var tmpCustomer = await FortnoxClient.CustomerConnector.CreateAsync(new Customer() { Name = "TmpCustomer", CountryCode = "SE", City = "Testopolis" });
Expand Down Expand Up @@ -141,7 +141,7 @@ public async Task Test_Find()
}

[TestMethod]
public async Task Test_DueDate()
public async Task Test_Invoice_DueDate()
{
#region Arrange
var tmpCustomer = await FortnoxClient.CustomerConnector.CreateAsync(new Customer() { Name = "TmpCustomer", CountryCode = "SE", City = "Testopolis" });
Expand Down Expand Up @@ -187,7 +187,7 @@ public async Task Test_DueDate()

[TestMethod]
[Ignore("Fails with error 'Kan inte skicka dokument om inte företaget är registrerat'")]
public async Task Test_EPrint()
public async Task Test_Invoice_EPrint()
{
#region Arrange
var cc = FortnoxClient.CustomerConnector;
Expand Down Expand Up @@ -229,7 +229,7 @@ public async Task Test_EPrint()

[Ignore("Fails with 'Bankuppgifter saknas'")]
[TestMethod]
public async Task Test_Print()
public async Task Test_Invoice_Print()
{
#region Arrange
var cc = FortnoxClient.CustomerConnector;
Expand Down Expand Up @@ -271,7 +271,7 @@ public async Task Test_Print()

[Ignore("Fails with 'Bankuppgifter saknas'")]
[TestMethod]
public async Task Test_Email()
public async Task Test_Invoice_Email()
{
#region Arrange
var tmpCustomer = await FortnoxClient.CustomerConnector.CreateAsync(new Customer() { Name = "TmpCustomer", CountryCode = "SE", City = "Testopolis", Email = "[email protected]" });
Expand Down Expand Up @@ -310,7 +310,7 @@ public async Task Test_Email()
}

[TestMethod]
public async Task Test_Search()
public async Task Test_Invoice_Search()
{
var connector = FortnoxClient.InvoiceConnector;
var searchSettings = new InvoiceSearch();
Expand Down
2 changes: 1 addition & 1 deletion FortnoxSDK.Tests/ConnectorTests/LabelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public async Task Test_Label_CRUD()
}

[TestMethod]
public async Task Test_Find()
public async Task Test_Label_Find()
{
var connector = FortnoxClient.LabelConnector;

Expand Down
2 changes: 1 addition & 1 deletion FortnoxSDK.Tests/ConnectorTests/ModeOfPaymentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_ModeOfPayment_Find()
{
#region Arrange
var tmpAccount = await FortnoxClient.AccountConnector.CreateAsync(new Account() { Description = "TestAccount", Number = TestUtils.GetUnusedAccountNumber() });
Expand Down
6 changes: 3 additions & 3 deletions FortnoxSDK.Tests/ConnectorTests/OfferTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public async Task Test_Offer_CRUD()
}

[TestMethod]
public async Task Test_Find()
public async Task Test_Offer_Find()
{
#region Arrange
var tmpCustomer = await FortnoxClient.CustomerConnector.CreateAsync(new Customer() { Name = "TmpCustomer", CountryCode = "SE", City = "Testopolis" });
Expand Down Expand Up @@ -133,7 +133,7 @@ public async Task Test_Find()
}

[TestMethod]
public async Task Test_Print()
public async Task Test_Offer_Print()
{
#region Arrange
var tmpCustomer = await FortnoxClient.CustomerConnector.CreateAsync(new Customer() { Name = "TmpCustomer", CountryCode = "SE", City = "Testopolis" });
Expand Down Expand Up @@ -168,7 +168,7 @@ public async Task Test_Print()
}

[TestMethod]
public async Task Test_Email()
public async Task Test_Offer_Email()
{
#region Arrange
var tmpCustomer = await FortnoxClient.CustomerConnector.CreateAsync(new Customer() { Name = "TmpCustomer", CountryCode = "SE", City = "Testopolis", Email = "[email protected]" });
Expand Down
6 changes: 3 additions & 3 deletions FortnoxSDK.Tests/ConnectorTests/OrderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public async Task Test_Order_CRUD()
}

[TestMethod]
public async Task Test_Find()
public async Task Test_Order_Find()
{
#region Arrange
var tmpCustomer = await FortnoxClient.CustomerConnector.CreateAsync(new Customer() { Name = "TmpCustomer", CountryCode = "SE", City = "Testopolis" });
Expand Down Expand Up @@ -130,7 +130,7 @@ public async Task Test_Find()
}

[TestMethod]
public async Task Test_Print()
public async Task Test_Order_Print()
{
#region Arrange
var tmpCustomer = await FortnoxClient.CustomerConnector.CreateAsync(new Customer() { Name = "TmpCustomer", CountryCode = "SE", City = "Testopolis" });
Expand Down Expand Up @@ -165,7 +165,7 @@ public async Task Test_Print()
}

[TestMethod]
public async Task Test_Email()
public async Task Test_Order_Email()
{
#region Arrange
var tmpCustomer = await FortnoxClient.CustomerConnector.CreateAsync(new Customer() { Name = "TmpCustomer", CountryCode = "SE", City = "Testopolis", Email = "[email protected]" });
Expand Down
2 changes: 1 addition & 1 deletion FortnoxSDK.Tests/ConnectorTests/PredefinedAccountsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task Test_PredefinedAccounts_CRUD()
}

[TestMethod]
public async Task Test_Find()
public async Task Test_PredefinedAccounts_Find()
{
var connector = FortnoxClient.PredefinedAccountsConnector;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public async Task Test_PredefinedVoucherSeries_CRUD()
}

[TestMethod]
public async Task Test_Find()
public async Task Test_PredefinedVoucherSeries_Find()
{
var connector = FortnoxClient.PredefinedVoucherSeriesConnector;

Expand Down
2 changes: 1 addition & 1 deletion FortnoxSDK.Tests/ConnectorTests/PriceListTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public async Task Test_PriceList_CRUD()
}

[TestMethod]
public async Task Test_Find()
public async Task Test_PriceList_Find()
{
var connector = FortnoxClient.PriceListConnector;

Expand Down
4 changes: 2 additions & 2 deletions FortnoxSDK.Tests/ConnectorTests/PriceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_Price_Find()
{
#region Arrange
var tmpArticleA = await FortnoxClient.ArticleConnector.CreateAsync(new Article() { Description = "TmpArticleA", PurchasePrice = 10 });
Expand Down Expand Up @@ -140,7 +140,7 @@ public async Task Test_Find()
}

[TestMethod]
public async Task Test_Find_Args_Specified()
public async Task Test_Price_Find_Args_Specified()
{
#region Arrange
var tmpArticle = await FortnoxClient.ArticleConnector.CreateAsync(new Article() { Description = "TmpArticle", PurchasePrice = 10 });
Expand Down
4 changes: 2 additions & 2 deletions FortnoxSDK.Tests/ConnectorTests/PrintTemplateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public async Task Test_PrintTemplate_CRUD()
}

[TestMethod]
public async Task Test_Find()
public async Task Test_PrintTemplate_Find()
{
var connector = FortnoxClient.PrintTemplateConnector;

Expand All @@ -31,7 +31,7 @@ public async Task Test_Find()
}

[TestMethod]
public async Task Test_Find_Filter()
public async Task Test_PrintTemplate_Find_Filter()
{
var connector = FortnoxClient.PrintTemplateConnector;
var searchSettings = new PrintTemplateSearch();
Expand Down
4 changes: 2 additions & 2 deletions FortnoxSDK.Tests/ConnectorTests/ProjectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_Project_Find()
{
#region Arrange
//Add code to create required resources
Expand Down Expand Up @@ -125,7 +125,7 @@ public async Task Test_Find()
}

[TestMethod]
public async Task Test_Find_By_Description()
public async Task Test_Project_Find_By_Description()
{
#region Arrange
//Add code to create required resources
Expand Down
1 change: 1 addition & 0 deletions FortnoxSDK.Tests/ConnectorTests/ScheduleTimesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class ScheduleTimesTests
{
public FortnoxClient FortnoxClient = TestUtils.DefaultFortnoxClient;

[Ignore("Unable to update Hours using test credentials, re-enable after switching from StaticTokenAuth to a service account with StandardAuth")]
[TestMethod]
public async Task Test_ScheduleTimes_CRUD()
{
Expand Down
4 changes: 2 additions & 2 deletions FortnoxSDK.Tests/ConnectorTests/SupplierInvoiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public async Task Test_SupplierInvoice_CRUD()
}

[TestMethod]
public async Task Test_Find()
public async Task Test_SupplierInvoice_Find()
{
#region Arrange
var tmpSupplier = await FortnoxClient.SupplierConnector.CreateAsync(new Supplier() { Name = "TmpSupplier" });
Expand Down Expand Up @@ -141,7 +141,7 @@ public async Task Test_Find()
}

[TestMethod]
public async Task Test_Book()
public async Task Test_SupplierInvoice_Book()
{
#region Arrange
var tmpSupplier = await FortnoxClient.SupplierConnector.CreateAsync(new Supplier() { Name = "TmpSupplier" });
Expand Down
4 changes: 2 additions & 2 deletions FortnoxSDK.Tests/ConnectorTests/SupplierTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_Supplier_Find()
{
#region Arrange
//Add code to create required resources
Expand Down Expand Up @@ -138,7 +138,7 @@ public async Task Test_Find()
}

[TestMethod]
public async Task VatType_Supported()
public async Task Test_Supplier_VatType_Supported()
{
var vatTypes = Enum.GetValues(typeof(SupplierVATType)).Cast<SupplierVATType>().ToList();

Expand Down
2 changes: 1 addition & 1 deletion FortnoxSDK.Tests/ConnectorTests/TaxReductionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_TaxReduction_Find()
{
#region Arrange
var tmpCustomer = await FortnoxClient.CustomerConnector.CreateAsync(new Customer() { Name = "TmpCustomer", CountryCode = "SE", City = "Testopolis" });
Expand Down
6 changes: 3 additions & 3 deletions FortnoxSDK.Tests/ConnectorTests/TermsOfDeliveryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ await Assert.ThrowsExceptionAsync<FortnoxApiException>(
}

[TestMethod]
public async Task Test_Find()
public async Task Test_TermsOfDelivery_Find()
{
var connector = FortnoxClient.TermsOfDeliveryConnector;

Expand All @@ -79,7 +79,7 @@ public async Task Test_Find()
{
await connector.DeleteAsync(entry.Code);
}

var newTermsOfDelivery = new TermsOfDelivery()
{
Description = "TestDeliveryTerms"
Expand All @@ -102,7 +102,7 @@ public async Task Test_Find()

//Apply Limit
//Terms of deleivery not working limit and not returning MetaInformation from fortnox response, so limit will not work as expected
searchSettings.Limit = 5;
searchSettings.Limit = 5;
var limitedCollection = await connector.FindAsync(searchSettings);

Assert.AreEqual(5, limitedCollection.Entities.Count);
Expand Down
Loading
Loading