Files
radzen-blazor/Radzen.Blazor.Tests/Spreadsheet/CountBlankFunctionTests.cs
Atanas Korchev 7179194877 Add Tier 1 and Tier 2 Excel-compatible formula functions
Add COUNTIF/COUNTIFS, SUMIFS, AVERAGEIF/AVERAGEIFS, MAXIFS/MINIFS, MATCH/XMATCH,
CONCATENATE, ABS, MOD, MEDIAN, IFS, SWITCH, POWER, SQRT, PRODUCT, SUMPRODUCT,
CEILING, FLOOR, STDEV/STDEVP/VAR/VARP (and .S/.P aliases), MODE (and MODE.SNGL),
RANK (and RANK.EQ), COUNTBLANK, IFNA, ISBLANK/ISNUMBER/ISTEXT/ISERROR/ISNA,
DAYS, NETWORKDAYS, WORKDAY, DATEVALUE, EXACT, CHAR, CODE.

Engine support: ParameterType.Group preserves argument boundaries for variadic
range/criteria pairs and arrays; FunctionStore.Add registers dotted-name aliases;
the parser accepts dotted function names; CellData comparisons are case-insensitive
and MatchesCriteria handles =/<> operators and wildcards. Fixes a latent CHOOSE bug
where range arguments were flattened. All function results verified against Excel.
2026-06-15 18:45:18 +03:00

21 lines
523 B
C#

using Xunit;
using Radzen.Documents.Spreadsheet;
namespace Radzen.Blazor.Spreadsheet.Tests;
public class CountBlankFunctionTests
{
readonly Worksheet sheet = new(10, 10);
[Fact]
public void ShouldCountEmptyAndFormulaEmptyString()
{
sheet.Cells["A1"].Value = 1;
// A2 left empty
sheet.Cells["A3"].Formula = "=IF(1=1,\"\",\"x\")"; // formula-produced empty string
sheet.Cells["B1"].Formula = "=COUNTBLANK(A1:A3)";
Assert.Equal(2d, sheet.Cells["B1"].Value);
}
}