Skip to content

Commit

Permalink
Removed a test that doesn't always work
Browse files Browse the repository at this point in the history
  • Loading branch information
Paolo Bassi authored and richardrandak committed Jan 23, 2024
1 parent fa3c0c1 commit 4cfde54
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions FortnoxSDK.Tests/ConnectorTests/PredefinedAccountsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Fortnox.SDK.Entities.Predefined_Accounts;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;

namespace FortnoxSDK.Tests.ConnectorTests;
Expand Down Expand Up @@ -57,22 +56,22 @@ public async Task Test_Find()

/// <summary>
/// It looks like that not all the Fortnox account have all accounts
/// so this test may fail
/// so this test may fail. Further investigations are needed in this regard.
/// </summary>
/// <returns></returns>
[TestMethod]
public async Task Test_FindAllAccounts()
{
var connector = FortnoxClient.PredefinedAccountsConnector;
//[TestMethod]
//public async Task Test_FindAllAccounts()
//{
// var connector = FortnoxClient.PredefinedAccountsConnector;

var fields = typeof(PredefinedAccountName)
.GetFields(BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy)
.Where(fi => fi.IsLiteral && !fi.IsInitOnly);
// var fields = typeof(PredefinedAccountName)
// .GetFields(BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy)
// .Where(fi => fi.IsLiteral && !fi.IsInitOnly);

foreach (var field in fields)
{
var predefineradAccount = await connector.GetAsync((string?)field.GetValue(null));
Assert.IsNotNull(predefineradAccount);
}
}
// foreach (var field in fields)
// {
// var predefineradAccount = await connector.GetAsync((string?)field.GetValue(null));
// Assert.IsNotNull(predefineradAccount);
// }
//}
}

0 comments on commit 4cfde54

Please sign in to comment.