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.
34 lines
958 B
C#
34 lines
958 B
C#
using Xunit;
|
|
|
|
using Radzen.Documents.Spreadsheet;
|
|
namespace Radzen.Blazor.Spreadsheet.Tests;
|
|
|
|
public class ProperFunctionTests
|
|
{
|
|
[Fact]
|
|
public void Proper_TitleCase_Simple()
|
|
{
|
|
var sheet = new Worksheet(10, 10);
|
|
sheet.Cells["A2"].Value = "this is a TITLE";
|
|
sheet.Cells["B1"].Formula = "=PROPER(A2)";
|
|
Assert.Equal("This Is A Title", sheet.Cells["B1"].Data.Value);
|
|
}
|
|
|
|
[Fact]
|
|
public void Proper_KeepsHyphenation()
|
|
{
|
|
var sheet = new Worksheet(10, 10);
|
|
sheet.Cells["A3"].Value = "2-way street";
|
|
sheet.Cells["B1"].Formula = "=PROPER(A3)";
|
|
Assert.Equal("2-Way Street", sheet.Cells["B1"].Data.Value);
|
|
}
|
|
|
|
[Fact]
|
|
public void Proper_AlnumBoundary()
|
|
{
|
|
var sheet = new Worksheet(10, 10);
|
|
sheet.Cells["A4"].Value = "76BudGet";
|
|
sheet.Cells["B1"].Formula = "=PROPER(A4)";
|
|
Assert.Equal("76Budget", sheet.Cells["B1"].Data.Value);
|
|
}
|
|
} |