diff --git a/src/AzureEventGridSimulator/Domain/Entities/EventGridEvent.cs b/src/AzureEventGridSimulator/Domain/Entities/EventGridEvent.cs index a55a31e..32ab09a 100644 --- a/src/AzureEventGridSimulator/Domain/Entities/EventGridEvent.cs +++ b/src/AzureEventGridSimulator/Domain/Entities/EventGridEvent.cs @@ -108,7 +108,7 @@ public void Validate() InvalidOperationException($"Property '{nameof(MetadataVersion)}' was found to be set to '{MetadataVersion}', but was expected to either be null or be set to 1."); } - if (Topic != null) + if (!string.IsNullOrEmpty(Topic)) { throw new InvalidOperationException($"Property '{nameof(Topic)}' was found to be set to '{Topic}', but was expected to either be null/empty."); }