Files
jdescopingtool/NEW/tests/JdeScoping.ExcelIO.Tests/Fixtures/LargeDataSetFixture.cs
T
Joseph Doherty 6952f686fa perf: optimize ExcelIO tests with fixture-based consolidation
- Add WorkbookFixtureBase and 4 concrete fixtures for shared workbooks
- Add ExcelTestHelpers with shared utility methods
- Create Integration/ folder with 7 fixture-based test classes:
  - MinimalSearchTests (5 tests)
  - SearchResultsSheetTests (5 tests)
  - MisInfoSheetTests (11 tests)
  - InvestigationSheetTests (7 tests)
  - ProtectionAndStyleTests (7 tests)
  - LegacyFormatTests (5 tests)
  - LargeDataSetTests (1 test)
- Delete redundant ExcelExportIntegrationTests.cs (26 tests)
- Delete redundant LegacyComparisonTests.cs (16 tests)
- Reduce workbook generations from ~42 to 4 fixtures
- Test runtime reduced from ~18 min to ~4 min (76% improvement)
- All 122 ExcelIO tests pass
2026-01-07 03:55:33 -05:00

36 lines
1.0 KiB
C#

using JdeScoping.ExcelIO.Models.Reporting;
using SearchResult = JdeScoping.Core.Models.SearchResults.SearchResult;
namespace JdeScoping.ExcelIO.Tests.Fixtures;
public class LargeDataSetFixture : WorkbookFixtureBase
{
protected override SearchModel CreateSearchModel()
{
var model = new SearchModel
{
Id = 1,
Name = "Large Data Set Test",
UserName = "testuser",
SubmitDt = new DateTime(2024, 1, 15, 14, 30, 45),
StartDt = new DateTime(2024, 1, 15, 14, 31, 0),
EndDt = new DateTime(2024, 1, 15, 14, 35, 0),
ExtractMisData = false,
Results = []
};
for (int i = 0; i < 1000; i++)
{
model.Results.Add(new SearchResult
{
WorkOrderNumber = 10000 + i,
ItemNumber = $"ITEM-{i:D5}",
LotNumber = $"LOT-{i:D5}",
Flagged = true
});
}
return model;
}
}