using System.Linq.Expressions;
using System.Net;
using Umbraco.Cms.Api.Management.Controllers.ModelsBuilder;

namespace Umbraco.Cms.Tests.Integration.ManagementApi.ModelsBuilder;

public class GetModelsBuilderControllerTests : ManagementApiUserGroupTestBase<GetModelsBuilderController>
{
    protected override Expression<Func<GetModelsBuilderController, object>> MethodSelector =>
        x => x.GetDashboard(CancellationToken.None);

    protected override UserGroupAssertionModel AdminUserGroupAssertionModel => new()
    {
        ExpectedStatusCode = HttpStatusCode.OK
    };

    protected override UserGroupAssertionModel EditorUserGroupAssertionModel => new()
    {
        ExpectedStatusCode = HttpStatusCode.Forbidden
    };

    protected override UserGroupAssertionModel SensitiveDataUserGroupAssertionModel => new()
    {
        ExpectedStatusCode = HttpStatusCode.Forbidden
    };

    protected override UserGroupAssertionModel TranslatorUserGroupAssertionModel => new()
    {
        ExpectedStatusCode = HttpStatusCode.Forbidden
    };

    protected override UserGroupAssertionModel WriterUserGroupAssertionModel => new()
    {
        ExpectedStatusCode = HttpStatusCode.Forbidden
    };

    protected override UserGroupAssertionModel UnauthorizedUserGroupAssertionModel => new()
    {
        ExpectedStatusCode = HttpStatusCode.Unauthorized
    };
}
