From 3217eb21a1ba27a79131af97805830f3a7ad75b1 Mon Sep 17 00:00:00 2001 From: Pawel Gerr Date: Wed, 23 Oct 2024 23:09:29 +0200 Subject: [PATCH] Removed '@' from error message --- .../ValueObjects/KeyedValueObjectCodeGenerator.cs | 2 +- .../ValueObjectSourceGeneratorTests.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Thinktecture.Runtime.Extensions.SourceGenerator/CodeAnalysis/ValueObjects/KeyedValueObjectCodeGenerator.cs b/src/Thinktecture.Runtime.Extensions.SourceGenerator/CodeAnalysis/ValueObjects/KeyedValueObjectCodeGenerator.cs index 62d6922b..49e91844 100644 --- a/src/Thinktecture.Runtime.Extensions.SourceGenerator/CodeAnalysis/ValueObjects/KeyedValueObjectCodeGenerator.cs +++ b/src/Thinktecture.Runtime.Extensions.SourceGenerator/CodeAnalysis/ValueObjects/KeyedValueObjectCodeGenerator.cs @@ -371,7 +371,7 @@ private void GenerateValidateMethod(bool allowNullKeyMemberInput, bool allowNull if(").AppendEscaped(_state.KeyMember.ArgumentName).Append(@" is null) { obj = default; - return global::Thinktecture.Internal.ValidationErrorCreator.CreateValidationError<").AppendTypeFullyQualified(_state.ValidationError).Append(@">(""The argument '").AppendEscaped(_state.KeyMember.ArgumentName).Append(@"' must not be null.""); + return global::Thinktecture.Internal.ValidationErrorCreator.CreateValidationError<").AppendTypeFullyQualified(_state.ValidationError).Append(@">(""The argument '").Append(_state.KeyMember.ArgumentName).Append(@"' must not be null.""); } "); } diff --git a/test/Thinktecture.Runtime.Extensions.SourceGenerator.Tests/SourceGeneratorTests/ValueObjectSourceGeneratorTests.cs b/test/Thinktecture.Runtime.Extensions.SourceGenerator.Tests/SourceGeneratorTests/ValueObjectSourceGeneratorTests.cs index 9b92edbb..21e27df1 100644 --- a/test/Thinktecture.Runtime.Extensions.SourceGenerator.Tests/SourceGeneratorTests/ValueObjectSourceGeneratorTests.cs +++ b/test/Thinktecture.Runtime.Extensions.SourceGenerator.Tests/SourceGeneratorTests/ValueObjectSourceGeneratorTests.cs @@ -1577,7 +1577,7 @@ internal static void ModuleInit() if(@value is null) { obj = default; - return global::Thinktecture.Internal.ValidationErrorCreator.CreateValidationError("The argument '@value' must not be null."); + return global::Thinktecture.Internal.ValidationErrorCreator.CreateValidationError("The argument 'value' must not be null."); } global::Thinktecture.ValidationError? validationError = null; @@ -1741,7 +1741,7 @@ internal static void ModuleInit() if(@value is null) { obj = default; - return global::Thinktecture.Internal.ValidationErrorCreator.CreateValidationError("The argument '@value' must not be null."); + return global::Thinktecture.Internal.ValidationErrorCreator.CreateValidationError("The argument 'value' must not be null."); } global::Thinktecture.ValidationError? validationError = null; @@ -5262,7 +5262,7 @@ internal static void ModuleInit() if(@value is null) { obj = default; - return global::Thinktecture.Internal.ValidationErrorCreator.CreateValidationError("The argument '@value' must not be null."); + return global::Thinktecture.Internal.ValidationErrorCreator.CreateValidationError("The argument 'value' must not be null."); } global::Thinktecture.ValidationError? validationError = null; @@ -5456,7 +5456,7 @@ internal static void ModuleInit() if(@value is null) { obj = default; - return global::Thinktecture.Internal.ValidationErrorCreator.CreateValidationError("The argument '@value' must not be null."); + return global::Thinktecture.Internal.ValidationErrorCreator.CreateValidationError("The argument 'value' must not be null."); } global::Thinktecture.ValidationError? validationError = null;