diff --git a/tests/PinguApps.Appwrite.Client.Tests/Clients/Account/AccountClientTests.cs b/tests/PinguApps.Appwrite.Client.Tests/Clients/Account/AccountClientTests.cs index 0a2785a5..c42858a7 100644 --- a/tests/PinguApps.Appwrite.Client.Tests/Clients/Account/AccountClientTests.cs +++ b/tests/PinguApps.Appwrite.Client.Tests/Clients/Account/AccountClientTests.cs @@ -45,28 +45,3 @@ public void SetSession_UpdatesSession() Assert.Equal(Constants.Session, accountClient.Session); } } - -public static class AccountTestsExtensions -{ - public static MockedRequest ExpectedHeaders(this MockedRequest request, bool addSessionHeaders = false) - { - var req = request - .WithHeaders("x-appwrite-project", Constants.ProjectId) - .WithHeaders("x-sdk-name", Constants.SdkName) - .WithHeaders("x-sdk-platform", "client") - .WithHeaders("x-sdk-language", Constants.SdkLanguage) - .WithHeaders("x-sdk-version", Constants.SdkVersion) - .WithHeaders("x-appwrite-response-format", Constants.AppwriteResponseFormat); - - if (addSessionHeaders) - return req.ExpectSessionHeaders(); - - return req; - } - - public static MockedRequest ExpectSessionHeaders(this MockedRequest request) - { - return request - .WithHeaders("x-appwrite-session", Constants.Session); - } -} diff --git a/tests/PinguApps.Appwrite.Client.Tests/Clients/Account/AccountTestsExtensions.cs b/tests/PinguApps.Appwrite.Client.Tests/Clients/Account/AccountTestsExtensions.cs new file mode 100644 index 00000000..dd6e9a7c --- /dev/null +++ b/tests/PinguApps.Appwrite.Client.Tests/Clients/Account/AccountTestsExtensions.cs @@ -0,0 +1,29 @@ +using PinguApps.Appwrite.Shared.Tests; +using RichardSzalay.MockHttp; + +namespace PinguApps.Appwrite.Client.Tests.Clients.Account; + +public static class AccountTestsExtensions +{ + public static MockedRequest ExpectedHeaders(this MockedRequest request, bool addSessionHeaders = false) + { + var req = request + .WithHeaders("x-appwrite-project", Constants.ProjectId) + .WithHeaders("x-sdk-name", Constants.SdkName) + .WithHeaders("x-sdk-platform", "client") + .WithHeaders("x-sdk-language", Constants.SdkLanguage) + .WithHeaders("x-sdk-version", Constants.SdkVersion) + .WithHeaders("x-appwrite-response-format", Constants.AppwriteResponseFormat); + + if (addSessionHeaders) + return req.ExpectSessionHeaders(); + + return req; + } + + public static MockedRequest ExpectSessionHeaders(this MockedRequest request) + { + return request + .WithHeaders("x-appwrite-session", Constants.Session); + } +}