Skip to content

Commit

Permalink
nmchang
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad committed Nov 10, 2024
1 parent 63cd775 commit 48311ed
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ public void Attachment_Object_Type_Should_Match_Property_Names_On_AttachmentEnti
nameof(Domain.Attachments.Attachment.UpdatedAt)
};

var attachmentPropertyNames = typeof(Attachment)
var attachmentProperties = typeof(Attachment)
.GetProperties()
.Select(p => p.Name)
.ToList();

var attachmentEntityPropertyNames = typeof(Domain.Attachments.Attachment)
var domainAttachmentProperties = typeof(Domain.Attachments.Attachment)
.GetProperties()
.Select(p => p.Name)
.Where(name => !ignoreList.Contains(name))
.ToList();

var missingProperties = attachmentEntityPropertyNames
.Except(attachmentPropertyNames, StringComparer.OrdinalIgnoreCase)
var missingProperties = domainAttachmentProperties
.Except(attachmentProperties, StringComparer.OrdinalIgnoreCase)
.ToList();

// Assert
Expand All @@ -48,19 +48,19 @@ public void AttachmentUrl_Object_Type_Should_Match_Property_Names_On_DialogAttac
nameof(DomainAttachmentUrl.Attachment)
};

var attachmentUrlPropertyNames = typeof(GraphQL.EndUser.DialogById.AttachmentUrl)
var attachmentUrlProperties = typeof(GraphQL.EndUser.DialogById.AttachmentUrl)
.GetProperties()
.Select(p => p.Name)
.ToList();

var domainAttachmentUrl = typeof(DomainAttachmentUrl)
var domainAttachmentUrlProperties = typeof(DomainAttachmentUrl)
.GetProperties()
.Select(p => p.Name)
.Where(name => !ignoreList.Contains(name))
.ToList();

var missingProperties = domainAttachmentUrl
.Except(attachmentUrlPropertyNames, StringComparer.OrdinalIgnoreCase)
var missingProperties = domainAttachmentUrlProperties
.Except(attachmentUrlProperties, StringComparer.OrdinalIgnoreCase)
.ToList();

// Assert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ public void Dialog_Object_Type_Should_Match_Property_Names_On_DialogEntity()
nameof(DialogEntity.DialogEndUserContext)
};

var dialogEntityPropertyNames = typeof(DialogEntity)
var dialogProperties = typeof(DialogEntity)
.GetProperties()
.Select(p => p.Name)
.Where(name => !ignoreList.Contains(name))
.ToList();

var dialogPropertyNames = typeof(Dialog)
var domainDialogProperties = typeof(Dialog)
.GetProperties()
.Select(p => p.Name)
.ToList();

var missingProperties = dialogEntityPropertyNames.Except(dialogPropertyNames, StringComparer.OrdinalIgnoreCase).ToList();
var missingProperties = dialogProperties.Except(domainDialogProperties, StringComparer.OrdinalIgnoreCase).ToList();

// Assert
Assert.True(missingProperties.Count == 0, $"Properties missing in graphql dialog: {string.Join(", ", missingProperties)}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ public void Transmission_Object_Type_Should_Match_Property_Names_On_DialogTransm
.Where(name => !ignoreList.Contains(name))
.ToList();

var transmissionPropertyNames = typeof(Transmission)
var transmissionProperties = typeof(Transmission)
.GetProperties()
.Select(p => p.Name)
.ToList();

var missingProperties = domainTransmissionProperties.Except(transmissionPropertyNames, StringComparer.OrdinalIgnoreCase).ToList();
var missingProperties = domainTransmissionProperties.Except(transmissionProperties, StringComparer.OrdinalIgnoreCase).ToList();

// Assert
Assert.True(missingProperties.Count == 0, $"Properties missing in graphql transmission: {string.Join(", ", missingProperties)}");
Expand All @@ -50,7 +50,7 @@ public void TransmissionType_Object_Type_Should_Match_Property_Names_On_DialogTr
.Select(f => f.Name)
.ToList();

var missingProperties = transmissionTypes.Except(domainTransmissionTypes, StringComparer.OrdinalIgnoreCase).ToList();
var missingProperties = domainTransmissionTypes.Except(transmissionTypes, StringComparer.OrdinalIgnoreCase).ToList();

// Assert
Assert.True(missingProperties.Count == 0, $"Properties missing in graphql TransmissionType: {string.Join(", ", missingProperties)}");
Expand Down

0 comments on commit 48311ed

Please sign in to comment.