-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add UTs for TextDataField primitives
- Loading branch information
1 parent
7177cdd
commit 56da546
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
src/Reveal.Sdk.Dom.Tests/Visualizations/Primitives/TextDataFieldFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |