Skip to content

Commit 32945d4

Browse files
author
Kevin Hellemun
committed
Changed SessionTest to delete conf file.
1 parent a9a9a7c commit 32945d4

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

BunqSdk.Tests/BunqSdkTestBase.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ protected static ApiContext GetApiContext()
3636
try
3737
{
3838
apiContext = ApiContext.Restore(FILENAME_CONTEXT_CONF);
39-
apiContext.EnsureSessionActive();
39+
// apiContext.EnsureSessionActive();
4040
}
4141
catch (BunqException)
4242
{
4343
apiContext = CreateApiContext();
4444
}
4545

46+
apiContext.EnsureSessionActive();
4647
apiContext.Save(FILENAME_CONTEXT_CONF);
4748

4849
return apiContext;

BunqSdk.Tests/Model/Generated/Endpoint/SessionTest.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
using Bunq.Sdk.Context;
1+
using System;
2+
using System.IO;
3+
using Bunq.Sdk.Context;
24
using Bunq.Sdk.Model.Generated.Endpoint;
35
using Xunit;
6+
using Xunit.Sdk;
47

58
namespace Bunq.Sdk.Tests.Model.Generated.Endpoint
69
{
@@ -10,6 +13,11 @@ namespace Bunq.Sdk.Tests.Model.Generated.Endpoint
1013
/// </summary>
1114
public class SessionTest : BunqSdkTestBase
1215
{
16+
/// <summary>
17+
/// Name of the context configuration file.
18+
/// </summary>
19+
private const string FILENAME_CONTEXT_CONF = "../../../bunq-test.conf";
20+
1321
/// <summary>
1422
/// Config values.
1523
/// </summary>
@@ -29,6 +37,8 @@ public class SessionTest : BunqSdkTestBase
2937
public void TestSessionDeletion()
3038
{
3139
Session.Delete(API_CONTEXT, SESSION_ID_DUMMY);
40+
41+
File.Delete(FILENAME_CONTEXT_CONF);
3242
}
3343
}
3444
}

0 commit comments

Comments
 (0)