using NUnit.Framework;
using UserManager.UnitTests.Helpers;

namespace UserManager.UnitTests.UserManager;

[TestFixture]
public class GetSsoProviderByIdUnitTests : UserManagerTestBase<object>
{
    [SetUp]
    public override async Task Setup()
    {
        await base.Setup();
    }

    [Test]
    public async Task GetProfile_UserExists_ReturnsSsoProvider()
    {
        //Arrange
        var ssoProviderId = 1;

        //Act
        var ssoProvider = await UserManager.GetSsoProviderById(ssoProviderId, CancellationToken.None);

        //Assert
        Assert.That(ssoProvider, Is.Not.Null);
    }

    [Test]
    public async Task GetProfile_UserExists_ReturnsNull()
    {
        //Arrange
        var ssoProviderId = 2;

        //Act
        var ssoProvider = await UserManager.GetSsoProviderById(ssoProviderId, CancellationToken.None);

        //Assert
        Assert.That(ssoProvider, Is.Null);
    }
}