using SharepointToolbox.Services;
using Xunit;

namespace SharepointToolbox.Tests.Services;

public class SiteListServiceTests
{
    [Fact]
    public void DeriveAdminUrl_WithStandardUrl_ReturnsAdminUrl()
    {
        var result = SiteListService.DeriveAdminUrl("https://contoso.sharepoint.com");
        Assert.Equal("https://contoso-admin.sharepoint.com", result);
    }

    [Fact]
    public void DeriveAdminUrl_WithTrailingSlash_ReturnsAdminUrl()
    {
        var result = SiteListService.DeriveAdminUrl("https://contoso.sharepoint.com/");
        Assert.Equal("https://contoso-admin.sharepoint.com", result);
    }
}
