Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,6 @@ FodyWeavers.xsd
*.sln.iml

/BenchmarkDotNet.Artifacts
/tests/MiniExcel.Tests.AspNetMvc/packages
/TestTemplate
/tests/MiniExcel.Tests/TemplateOptimization
/samples/xlsx/Test_EnableWriteFilePath.xlsx
/tests/MiniExcel.Core.Tests/TemplateOptimization/
/tests/data/xlsx/Test_EnableWriteFilePath.xlsx
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net8.0;net9.0;net10.0</TargetFrameworks>
<Version>2.0.0-preview.1</Version>
<Version>2.0.0-preview.2</Version>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>14</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ public class MiniExcelOpenXmlConfigurationTest
{
private readonly OpenXmlImporter _excelImporter = MiniExcel.Importers.GetOpenXmlImporter();
private readonly OpenXmlExporter _excelExporter = MiniExcel.Exporters.GetOpenXmlExporter();

[Fact]
public async Task EnableWriteFilePathTest()
public async Task DisableWriteFilePathTest()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While the new test name DisableWriteFilePathTest accurately reflects that it's testing with EnableWriteFilePath = false, the property name EnableWriteFilePath itself seems potentially misleading. The test logic suggests this property controls whether image data (byte[]) is exported, not file paths. The assertion Assert.True(rows.All(x => x.Img is null or [])) confirms that when this property is false, the image content is not written. For better code clarity and maintainability, consider renaming EnableWriteFilePath to something more descriptive like EnableImageExport or WriteImageContent in a future change. This would make the configuration option's purpose clearer to users of the library.

{
var img = await new HttpClient().GetByteArrayAsync("https://user-images.githubusercontent.com/12729184/150462383-ad9931b3-ed8d-4221-a1d6-66f799743433.png");
ImgExportTestDto[] value =
Expand Down
Loading