Establishes the foundational structure, core Excel functionality, and tooling. - Implements base components for cells, ranges, columns, and rows. - Integrates a custom calculation engine with a wide range of Excel functions. - Adds comprehensive support for styling, conditional formatting, data validation, comments, pictures, and charts. - Configures build setup, project metadata (NuGet), and developer guidelines. - Includes editor and Git attributes for consistent code style and line endings.
31 lines
1020 B
C#
31 lines
1020 B
C#
using ClosedXML.Excel;
|
|
using NUnit.Framework;
|
|
|
|
namespace ClosedXML_Tests.Excel.Styles
|
|
{
|
|
public class FontTests
|
|
{
|
|
[Test]
|
|
public void XLFontKey_GetHashCode_IsCaseInsensitive()
|
|
{
|
|
var fontKey1 = new XLFontKey { FontName = "Arial" };
|
|
var fontKey2 = new XLFontKey { FontName = "Times New Roman" };
|
|
var fontKey3 = new XLFontKey { FontName = "TIMES NEW ROMAN" };
|
|
|
|
Assert.AreNotEqual(fontKey1.GetHashCode(), fontKey2.GetHashCode());
|
|
Assert.AreEqual(fontKey2.GetHashCode(), fontKey3.GetHashCode());
|
|
}
|
|
|
|
[Test]
|
|
public void XLFontKey_Equals_IsCaseInsensitive()
|
|
{
|
|
var fontKey1 = new XLFontKey { FontName = "Arial" };
|
|
var fontKey2 = new XLFontKey { FontName = "Times New Roman" };
|
|
var fontKey3 = new XLFontKey { FontName = "TIMES NEW ROMAN" };
|
|
|
|
Assert.IsFalse(fontKey1.Equals(fontKey2));
|
|
Assert.IsTrue(fontKey2.Equals(fontKey3));
|
|
}
|
|
}
|
|
}
|