Skip to content

Commit

Permalink
test: Add SystemLabel object type test (#1772)
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad authored Feb 3, 2025
1 parent 8be436e commit 5b61dda
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Digdir.Domain.Dialogporten.GraphQL.EndUser.Common;
using DomainSystemLabel = Digdir.Domain.Dialogporten.Domain
.DialogEndUserContexts.Entities.SystemLabel.Values;

namespace Digdir.Domain.Dialogporten.GraphQl.Unit.Tests.ObjectTypes;

public class SystemLabelTests
{
[Fact]
public void SystemLabel_Types_In_GraphQl_Must_Match_Domain_Types()
{
// Arrange
var domainTypes = Enum.GetValues(typeof(DomainSystemLabel)).Cast<DomainSystemLabel>().ToList();
var graphQlTypes = Enum.GetValues(typeof(SystemLabel)).Cast<SystemLabel>().ToList();

// Assert
Assert.Equal(domainTypes.Count, graphQlTypes.Count);

for (var i = 0; i < domainTypes.Count; i++)
{
Assert.Equal(domainTypes[i].ToString(), graphQlTypes[i].ToString());
}
}
}

0 comments on commit 5b61dda

Please sign in to comment.