Files
radzen-blazor/Radzen.Blazor.Tests/Spreadsheet/ColumnsFunctionTests.cs
Atanas Korchev 622b24c4f1 Rename Sheet class to Worksheet
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.
2026-06-15 18:45:03 +03:00

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);
}
}