feat(03-01): create Phase 3 export stubs and test scaffolds
- Add StorageCsvExportService, StorageHtmlExportService stub (Plan 03-03) - Add SearchCsvExportService, SearchHtmlExportService stub (Plan 03-05) - Add DuplicatesHtmlExportService stub (Plan 03-05) - Add StorageServiceTests, SearchServiceTests, DuplicatesServiceTests scaffolds - Add export test scaffolds for all 4 Phase 3 export services - 7 pure-logic tests pass (VersionSizeBytes + MakeKey); 4 CSOM stubs skip
This commit is contained in:
31
SharepointToolbox.Tests/Services/StorageServiceTests.cs
Normal file
31
SharepointToolbox.Tests/Services/StorageServiceTests.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using SharepointToolbox.Core.Models;
|
||||
using SharepointToolbox.Services;
|
||||
using Xunit;
|
||||
|
||||
namespace SharepointToolbox.Tests.Services;
|
||||
|
||||
public class StorageServiceTests
|
||||
{
|
||||
[Fact(Skip = "Requires live CSOM context — covered by Plan 03-02 implementation")]
|
||||
public Task CollectStorageAsync_ReturnsLibraryNodes_ForDocumentLibraries()
|
||||
=> Task.CompletedTask;
|
||||
|
||||
[Fact(Skip = "Requires live CSOM context — covered by Plan 03-02 implementation")]
|
||||
public Task CollectStorageAsync_WithFolderDepth1_ReturnsSubfolderNodes()
|
||||
=> Task.CompletedTask;
|
||||
|
||||
[Fact]
|
||||
public void StorageNode_VersionSizeBytes_IsNonNegative()
|
||||
{
|
||||
// VersionSizeBytes = TotalSizeBytes - FileStreamSizeBytes (never negative)
|
||||
var node = new StorageNode { TotalSizeBytes = 1000L, FileStreamSizeBytes = 1200L };
|
||||
Assert.Equal(0L, node.VersionSizeBytes); // Math.Max(0, -200) = 0
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void StorageNode_VersionSizeBytes_IsCorrectWhenPositive()
|
||||
{
|
||||
var node = new StorageNode { TotalSizeBytes = 5000L, FileStreamSizeBytes = 3000L };
|
||||
Assert.Equal(2000L, node.VersionSizeBytes);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user