Skip to content

Commit

Permalink
Stop PerformanceTest
Browse files Browse the repository at this point in the history
  • Loading branch information
shps951023 committed Apr 13, 2021
1 parent 6dea49d commit 15681d7
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions tests/MiniExcelTests/MiniExcelTemplateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,33 +57,33 @@ public void TemplateBasiTest()
}

//[Fact]
public void PerformanceTest()
{
// MiniExcel
{
var path = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid().ToString()}.xlsx");
var templatePath = @"..\..\..\..\..\samples\xlsx\TestTemplateBasicIEmumerableFill.xlsx";
var value = new
{
employees = Enumerable.Range(1, 1000000).Select(s => new { name = "Jack", department = "HR" })
};
MiniExcel.SaveAsByTemplate(path, templatePath, value);
}

// ClosexXml.Report
{
var path = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid().ToString()}.xlsx");
var templatePath = @"..\..\..\..\..\samples\xlsx\TestTemplateBasicIEmumerableFill_ClosedXML_Report.xlsx";
var template = new ClosedXML.Report.XLTemplate(templatePath);
var value = new
{
employees = Enumerable.Range(1, 1000000).Select(s => new { name = "Jack", department = "HR" })
};
template.AddVariable(value);
template.Generate();
template.SaveAs(path);
}
}
//public void PerformanceTest()
//{
// // MiniExcel
// {
// var path = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid().ToString()}.xlsx");
// var templatePath = @"..\..\..\..\..\samples\xlsx\TestTemplateBasicIEmumerableFill.xlsx";
// var value = new
// {
// employees = Enumerable.Range(1, 1000000).Select(s => new { name = "Jack", department = "HR" })
// };
// MiniExcel.SaveAsByTemplate(path, templatePath, value);
// }

// // ClosexXml.Report
// {
// var path = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid().ToString()}.xlsx");
// var templatePath = @"..\..\..\..\..\samples\xlsx\TestTemplateBasicIEmumerableFill_ClosedXML_Report.xlsx";
// var template = new ClosedXML.Report.XLTemplate(templatePath);
// var value = new
// {
// employees = Enumerable.Range(1, 1000000).Select(s => new { name = "Jack", department = "HR" })
// };
// template.AddVariable(value);
// template.Generate();
// template.SaveAs(path);
// }
//}

[Fact]
public void TestIEnumerable()
Expand Down

0 comments on commit 15681d7

Please sign in to comment.