test(02-03): add failing tests for SiteListService.DeriveAdminUrl
- Two tests for DeriveAdminUrl: standard URL and trailing-slash URL - Tests fail (RED) — SiteListService not yet implemented
This commit is contained in:
21
SharepointToolbox.Tests/Services/SiteListServiceTests.cs
Normal file
21
SharepointToolbox.Tests/Services/SiteListServiceTests.cs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user