Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Commit

Permalink
Minor test-related change
Browse files Browse the repository at this point in the history
  • Loading branch information
eraydin committed Mar 19, 2019
1 parent ac30a74 commit 69233d4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions test/EPPlus.Core.Extensions.Tests/ToExcelExtensions_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -644,31 +644,32 @@ public void Worksheet_should_match_specified_string_columns()
}

[Fact]
public void Should_add_two_different_titles()
public void Should_add_multiple_titles()
{
//-----------------------------------------------------------------------------------------------------------
// Arrange
//-----------------------------------------------------------------------------------------------------------
ExcelPackage package;
var worksheetIndex = 0;
#if NETFRAMEWORK
worksheetIndex = 1;
#endif
const string worksheetName = "Actors";

//-----------------------------------------------------------------------------------------------------------
// Act
//-----------------------------------------------------------------------------------------------------------
package = _personList
.ToWorksheet("Actors")
.ToWorksheet(worksheetName)
.WithTitle("title 1")
.WithTitle("title 2")
.WithTitle("title 3")
.ToExcelPackage();

//-----------------------------------------------------------------------------------------------------------
// Assert
//-----------------------------------------------------------------------------------------------------------
package.GetWorksheet(worksheetIndex).Cells[1, 1].Value.Should().Be("title 1");
package.GetWorksheet(worksheetIndex).Cells[2, 1].Value.Should().Be("title 2");
var worksheet = package.GetWorksheet(worksheetName);
worksheet.Cells[1, 1].Value.Should().Be("title 1");
worksheet.Cells[2, 1].Value.Should().Be("title 2");
worksheet.Cells[3, 1].Value.Should().Be("title 3");
// TODO: Fix reparsing problem. Provide an option to set Excel worksheet start index.
}
}
}

0 comments on commit 69233d4

Please sign in to comment.