Skip to content

Commit

Permalink
add UTs for TextDataField primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
hainv-infragistics committed Jan 7, 2025
1 parent 7177cdd commit 56da546
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Reveal.Sdk.Dom.Core.Constants;
using Reveal.Sdk.Dom.Visualizations;
using Xunit;

namespace Reveal.Sdk.Dom.Tests.Visualizations.Primitives
{
public class TextDataFieldFixture
{
[Fact]
public void Constructor_SetsDefaultValues_WhenConstructedWithNoFieldName()
{
// Act
var band = new TextDataField();

// Assert
Assert.Equal(SchemaTypeNames.SummarizationRegularFieldType, band.SchemaTypeName);
Assert.Equal(string.Empty, band.FieldName);
}

[Fact]
public void Constructor_SetsDefaultValues_WhenConstructedWithFieldName()
{
// Arrange
var fieldName = "TestFieldName";

// Act
var band = new TextDataField(fieldName);

// Assert
Assert.Equal(SchemaTypeNames.SummarizationRegularFieldType, band.SchemaTypeName);
Assert.Equal(fieldName, band.FieldName);
}
}
}

0 comments on commit 56da546

Please sign in to comment.