diff --git a/FlexiMail.Tests.Unit/Services/FlexiExchangeServiceTests.Validations.cs b/FlexiMail.Tests.Unit/Services/FlexiExchangeServiceTests.Validations.cs index 001a37e..dd263bc 100644 --- a/FlexiMail.Tests.Unit/Services/FlexiExchangeServiceTests.Validations.cs +++ b/FlexiMail.Tests.Unit/Services/FlexiExchangeServiceTests.Validations.cs @@ -74,15 +74,7 @@ public async void ShouldThrowValidationExceptionIfNoReceiverWasAdded() invalidFlexiMessageException.AddData( key: nameof(FlexiMessage.To), - values: "Value is not set"); - - invalidFlexiMessageException.AddData( - key: nameof(FlexiMessage.Cc), - values: "Value is not set"); - - invalidFlexiMessageException.AddData( - key: nameof(FlexiMessage.Bcc), - values: "Value is not set"); + values: "Value is not set"); var expectedFlexiMessageValidationException = new FlexiMessageValidationException( diff --git a/FlexiMail/Services/FlexiExchangeService.Validations.cs b/FlexiMail/Services/FlexiExchangeService.Validations.cs index fc88d99..6516904 100644 --- a/FlexiMail/Services/FlexiExchangeService.Validations.cs +++ b/FlexiMail/Services/FlexiExchangeService.Validations.cs @@ -14,9 +14,9 @@ private static void ValidFlexiMessage(FlexiMessage flexiMessage) { ValidFlexiMessageIsNotNull(flexiMessage); - Validate((Rule: IsInvalid(flexiMessage.To), Parameter: nameof(FlexiMessage.To)), - (Rule: IsInvalid(flexiMessage.Cc), Parameter: nameof(FlexiMessage.Cc)), - (Rule: IsInvalid(flexiMessage.Bcc), Parameter: nameof(FlexiMessage.Bcc))); + Validate((Rule: IsInvalid(flexiMessage.To), Parameter: nameof(FlexiMessage.To))); + Validate((Rule: IsInvalid(flexiMessage.Cc), Parameter: nameof(FlexiMessage.Cc))); + Validate((Rule: IsInvalid(flexiMessage.Bcc), Parameter: nameof(FlexiMessage.Bcc))); } private static void ValidFlexiMessageIsNotNull(FlexiMessage flexiMessage)