Skip to content

AuthServiceTest

Namespace: SlottyMedia.Tests.Auth

Tests the non-supabase reliant business logic of AuthService.

public class AuthServiceTest

Inheritance ObjectAuthServiceTest

Constructors

AuthServiceTest()

public AuthServiceTest()

Methods

OneTimeSetup()

Sets up the test fixture. Initializes the Supabase client and mocks the cookie service.

public void OneTimeSetup()

Setup()

Sets up each test. Generates a new UUID for the username and email.

public void Setup()

TearDown()

Tears down each test. Resets the cookie service mock and clears the session.

public void TearDown()

SaveSessionAsync_TokenNotProvided()

Tests that SaveSessionAsync throws a TokenNotProvidedException when the token is not provided.

public void SaveSessionAsync_TokenNotProvided()

SaveSessionAsync()

Tests that SaveSessionAsync saves the session and sets the cookies correctly.

public void SaveSessionAsync()

RestoreSessionAsync_TokenNotProvided()

Tests that RestoreSessionAsync throws a TokenNotProvidedException when the token is not provided.

public void RestoreSessionAsync_TokenNotProvided()

SignOut_CookiesNotRemoved()

Tests that SignOut does not remove the cookies.

public void SignOut_CookiesNotRemoved()