mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-07-08 18:16:08 +00:00
Matches Excel terminology, OpenXML spec, and industry convention (Aspose, Telerik, Syncfusion all use Worksheet). Property names on components remain Sheet for now; only the type name changes.
31 lines
818 B
C#
31 lines
818 B
C#
using Xunit;
|
|
|
|
using Radzen.Documents.Spreadsheet;
|
|
namespace Radzen.Blazor.Spreadsheet.Tests;
|
|
|
|
public class ColumnsFunctionTests
|
|
{
|
|
[Fact]
|
|
public void Columns_Range_ReturnsColumnCount()
|
|
{
|
|
var sheet = new Worksheet(50, 20);
|
|
sheet.Cells["A1"].Formula = "=COLUMNS(C1:E4)";
|
|
Assert.Equal(3d, sheet.Cells["A1"].Data.Value);
|
|
}
|
|
|
|
[Fact]
|
|
public void Columns_SingleCell_ReturnsOne()
|
|
{
|
|
var sheet = new Worksheet(50, 20);
|
|
sheet.Cells["A1"].Formula = "=COLUMNS(C10)";
|
|
Assert.Equal(1d, sheet.Cells["A1"].Data.Value);
|
|
}
|
|
|
|
[Fact]
|
|
public void Columns_SingleColumnRange_ReturnsOne()
|
|
{
|
|
var sheet = new Worksheet(50, 20);
|
|
sheet.Cells["A1"].Formula = "=COLUMNS(C10:C20)";
|
|
Assert.Equal(1d, sheet.Cells["A1"].Data.Value);
|
|
}
|
|
} |