6952f686fa
- 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
42 lines
997 B
C#
42 lines
997 B
C#
using Shouldly;
|
|
using Xunit;
|
|
using ExcelFormats = JdeScoping.ExcelIO.Formatting.ExcelFormats;
|
|
|
|
namespace JdeScoping.ExcelIO.Tests.Integration;
|
|
|
|
/// <summary>
|
|
/// Tests for ExcelFormats constants - no workbook generation needed.
|
|
/// </summary>
|
|
public class LegacyFormatTests
|
|
{
|
|
[Fact]
|
|
public void TimestampFormat_MatchesLegacy()
|
|
{
|
|
ExcelFormats.TimestampFormat.ShouldBe("[$-409]m/d/yy h:mm AM/PM;@");
|
|
}
|
|
|
|
[Fact]
|
|
public void DateFormat_MatchesLegacyPattern()
|
|
{
|
|
ExcelFormats.DateFormat.ShouldContain("MM/dd/yyyy");
|
|
}
|
|
|
|
[Fact]
|
|
public void WrappedColumnWidth_MatchesLegacy()
|
|
{
|
|
ExcelFormats.WrappedColumnWidth.ShouldBe(65);
|
|
}
|
|
|
|
[Fact]
|
|
public void CriteriaPaddingFactor_MatchesLegacy()
|
|
{
|
|
ExcelFormats.CriteriaPaddingFactor.ShouldBe(1.15);
|
|
}
|
|
|
|
[Fact]
|
|
public void DataPaddingFactor_MatchesLegacy()
|
|
{
|
|
ExcelFormats.DataPaddingFactor.ShouldBe(1.30);
|
|
}
|
|
}
|