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:
@@ -0,0 +1,14 @@
|
||||
using SharepointToolbox.Core.Models;
|
||||
|
||||
namespace SharepointToolbox.Services.Export;
|
||||
|
||||
public class DuplicatesHtmlExportService
|
||||
{
|
||||
public string BuildHtml(IReadOnlyList<DuplicateGroup> groups) => string.Empty; // implemented in Plan 03-05
|
||||
|
||||
public async Task WriteAsync(IReadOnlyList<DuplicateGroup> groups, string filePath, CancellationToken ct)
|
||||
{
|
||||
var html = BuildHtml(groups);
|
||||
await System.IO.File.WriteAllTextAsync(filePath, html, System.Text.Encoding.UTF8, ct);
|
||||
}
|
||||
}
|
||||
14
SharepointToolbox/Services/Export/SearchCsvExportService.cs
Normal file
14
SharepointToolbox/Services/Export/SearchCsvExportService.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using SharepointToolbox.Core.Models;
|
||||
|
||||
namespace SharepointToolbox.Services.Export;
|
||||
|
||||
public class SearchCsvExportService
|
||||
{
|
||||
public string BuildCsv(IReadOnlyList<SearchResult> results) => string.Empty; // implemented in Plan 03-05
|
||||
|
||||
public async Task WriteAsync(IReadOnlyList<SearchResult> results, string filePath, CancellationToken ct)
|
||||
{
|
||||
var csv = BuildCsv(results);
|
||||
await System.IO.File.WriteAllTextAsync(filePath, csv, new System.Text.UTF8Encoding(true), ct);
|
||||
}
|
||||
}
|
||||
14
SharepointToolbox/Services/Export/SearchHtmlExportService.cs
Normal file
14
SharepointToolbox/Services/Export/SearchHtmlExportService.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using SharepointToolbox.Core.Models;
|
||||
|
||||
namespace SharepointToolbox.Services.Export;
|
||||
|
||||
public class SearchHtmlExportService
|
||||
{
|
||||
public string BuildHtml(IReadOnlyList<SearchResult> results) => string.Empty; // implemented in Plan 03-05
|
||||
|
||||
public async Task WriteAsync(IReadOnlyList<SearchResult> results, string filePath, CancellationToken ct)
|
||||
{
|
||||
var html = BuildHtml(results);
|
||||
await System.IO.File.WriteAllTextAsync(filePath, html, System.Text.Encoding.UTF8, ct);
|
||||
}
|
||||
}
|
||||
14
SharepointToolbox/Services/Export/StorageCsvExportService.cs
Normal file
14
SharepointToolbox/Services/Export/StorageCsvExportService.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using SharepointToolbox.Core.Models;
|
||||
|
||||
namespace SharepointToolbox.Services.Export;
|
||||
|
||||
public class StorageCsvExportService
|
||||
{
|
||||
public string BuildCsv(IReadOnlyList<StorageNode> nodes) => string.Empty; // implemented in Plan 03-03
|
||||
|
||||
public async Task WriteAsync(IReadOnlyList<StorageNode> nodes, string filePath, CancellationToken ct)
|
||||
{
|
||||
var csv = BuildCsv(nodes);
|
||||
await System.IO.File.WriteAllTextAsync(filePath, csv, new System.Text.UTF8Encoding(true), ct);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using SharepointToolbox.Core.Models;
|
||||
|
||||
namespace SharepointToolbox.Services.Export;
|
||||
|
||||
public class StorageHtmlExportService
|
||||
{
|
||||
public string BuildHtml(IReadOnlyList<StorageNode> nodes) => string.Empty; // implemented in Plan 03-03
|
||||
|
||||
public async Task WriteAsync(IReadOnlyList<StorageNode> nodes, string filePath, CancellationToken ct)
|
||||
{
|
||||
var html = BuildHtml(nodes);
|
||||
await System.IO.File.WriteAllTextAsync(filePath, html, System.Text.Encoding.UTF8, ct);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user