From 0bba44eabaa0ca071068be291ad56c459d1a710c Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Fri, 13 Oct 2017 15:19:32 +0200 Subject: [PATCH] Added dots everywhere --- .../LanguagesConfig.cs | 6 ++-- .../Schemas/NamedElementPropertiesBase.cs | 2 +- .../Schemas/Validators/RangeValidator.cs | 2 +- .../Validators/StringLengthValidator.cs | 2 +- .../Scripting/ContentWrapper/JsonMapper.cs | 4 +-- .../Contents/MongoContentRepository.cs | 8 ++--- .../Contents/Visitors/FilterBuilder.cs | 4 +-- .../Apps/AppClient.cs | 2 +- .../Apps/AppClients.cs | 2 +- .../Apps/AppCommandMiddleware.cs | 12 +++---- .../Apps/AppContributors.cs | 4 +-- .../Apps/Commands/AddLanguage.cs | 2 +- .../Apps/Commands/AssignContributor.cs | 4 +-- .../Apps/Commands/AttachClient.cs | 2 +- .../Apps/Commands/ChangePlan.cs | 2 +- .../Apps/Commands/CreateApp.cs | 2 +- .../Apps/Commands/RemoveContributor.cs | 2 +- .../Apps/Commands/RemoveLanguage.cs | 2 +- .../Apps/Commands/RevokeClient.cs | 2 +- .../Apps/Commands/UpdateClient.cs | 2 +- .../Apps/Commands/UpdateLanguage.cs | 2 +- .../Contents/Commands/ContentDataCommand.cs | 2 +- .../Schemas/Guards/SchemaGuard.cs | 6 ++-- .../Schemas/SchemaCommandMiddleware.cs | 2 +- .../Webhooks/Commands/WebhookEditCommand.cs | 2 +- .../Commands/DefaultDomainObjectFactory.cs | 2 +- src/Squidex.Infrastructure/Guard.cs | 4 +-- .../Json/NamedGuidIdConverter.cs | 4 +-- .../Json/NamedLongIdConverter.cs | 4 +-- .../Json/NamedStringIdConverter.cs | 2 +- src/Squidex.Infrastructure/RefToken.cs | 2 +- src/Squidex/Config/Domain/AssetStoreModule.cs | 2 +- src/Squidex/Config/Domain/EventStoreModule.cs | 6 ++-- .../Config/Domain/StoreMongoDbModule.cs | 4 +-- .../Api/Users/UserManagementController.cs | 2 +- src/Squidex/Controllers/ControllerBase.cs | 2 +- .../UI/Account/AccountController.cs | 8 ++--- .../EnrichWithActorCommandMiddleware.cs | 4 +-- .../EnrichWithAppIdCommandMiddleware.cs | 2 +- .../ContentValidationTests.cs | 34 +++++++++---------- .../AssetsFieldPropertiesTests.cs | 2 +- .../BooleanFieldPropertiesTests.cs | 2 +- .../DateTimeFieldPropertiesTests.cs | 12 +++---- .../GeolocationFieldPropertiesTests.cs | 2 +- .../NumberFieldPropertiesTests.cs | 14 ++++---- .../ReferencesFieldPropertiesTests.cs | 2 +- .../StringFieldPropertiesTests.cs | 12 +++---- .../TestHelpers/HandlerTestBase.cs | 4 +-- .../GuardTests.cs | 2 +- 49 files changed, 108 insertions(+), 108 deletions(-) diff --git a/src/Squidex.Domain.Apps.Core/LanguagesConfig.cs b/src/Squidex.Domain.Apps.Core/LanguagesConfig.cs index fce4bd48c..16efefb56 100644 --- a/src/Squidex.Domain.Apps.Core/LanguagesConfig.cs +++ b/src/Squidex.Domain.Apps.Core/LanguagesConfig.cs @@ -169,7 +169,7 @@ namespace Squidex.Domain.Apps.Core if (errors.Count > 0) { - throw new ValidationException("Cannot configure language", errors); + throw new ValidationException("Cannot configure language.", errors); } return languages; @@ -187,7 +187,7 @@ namespace Squidex.Domain.Apps.Core { if (Contains(language)) { - var error = new ValidationError("Language is already part of the app", "Language"); + var error = new ValidationError("Language is already part of the app.", "Language"); throw new ValidationException(message(), error); } @@ -197,7 +197,7 @@ namespace Squidex.Domain.Apps.Core { if (master?.Language == language || isMaster) { - var error = new ValidationError("Language is the master language", "Language"); + var error = new ValidationError("Language is the master language.", "Language"); throw new ValidationException(message(), error); } diff --git a/src/Squidex.Domain.Apps.Core/Schemas/NamedElementPropertiesBase.cs b/src/Squidex.Domain.Apps.Core/Schemas/NamedElementPropertiesBase.cs index 4b7dad2c3..f2068117d 100644 --- a/src/Squidex.Domain.Apps.Core/Schemas/NamedElementPropertiesBase.cs +++ b/src/Squidex.Domain.Apps.Core/Schemas/NamedElementPropertiesBase.cs @@ -49,7 +49,7 @@ namespace Squidex.Domain.Apps.Core.Schemas { if (IsFrozen) { - throw new InvalidOperationException("Object is frozen"); + throw new InvalidOperationException("Object is frozen."); } } diff --git a/src/Squidex.Domain.Apps.Core/Schemas/Validators/RangeValidator.cs b/src/Squidex.Domain.Apps.Core/Schemas/Validators/RangeValidator.cs index 72e0f8b78..d0ca2cbba 100644 --- a/src/Squidex.Domain.Apps.Core/Schemas/Validators/RangeValidator.cs +++ b/src/Squidex.Domain.Apps.Core/Schemas/Validators/RangeValidator.cs @@ -21,7 +21,7 @@ namespace Squidex.Domain.Apps.Core.Schemas.Validators { if (min.HasValue && max.HasValue && min.Value.CompareTo(max.Value) >= 0) { - throw new ArgumentException("Min value must be greater than max value", nameof(min)); + throw new ArgumentException("Min value must be greater than max value.", nameof(min)); } this.min = min; diff --git a/src/Squidex.Domain.Apps.Core/Schemas/Validators/StringLengthValidator.cs b/src/Squidex.Domain.Apps.Core/Schemas/Validators/StringLengthValidator.cs index 5c0707a66..5a03db43e 100644 --- a/src/Squidex.Domain.Apps.Core/Schemas/Validators/StringLengthValidator.cs +++ b/src/Squidex.Domain.Apps.Core/Schemas/Validators/StringLengthValidator.cs @@ -21,7 +21,7 @@ namespace Squidex.Domain.Apps.Core.Schemas.Validators { if (minLength.HasValue && maxLength.HasValue && minLength.Value >= maxLength.Value) { - throw new ArgumentException("Min length must be greater than max length", nameof(minLength)); + throw new ArgumentException("Min length must be greater than max length.", nameof(minLength)); } this.minLength = minLength; diff --git a/src/Squidex.Domain.Apps.Core/Scripting/ContentWrapper/JsonMapper.cs b/src/Squidex.Domain.Apps.Core/Scripting/ContentWrapper/JsonMapper.cs index ea4e40f50..6704c5440 100644 --- a/src/Squidex.Domain.Apps.Core/Scripting/ContentWrapper/JsonMapper.cs +++ b/src/Squidex.Domain.Apps.Core/Scripting/ContentWrapper/JsonMapper.cs @@ -58,7 +58,7 @@ namespace Squidex.Domain.Apps.Core.Scripting.ContentWrapper } } - throw new ArgumentException("Invalid json type", nameof(value)); + throw new ArgumentException("Invalid json type.", nameof(value)); } private static JsValue FromObject(JToken value, Engine engine) @@ -140,7 +140,7 @@ namespace Squidex.Domain.Apps.Core.Scripting.ContentWrapper return target; } - throw new ArgumentException("Invalid json type", nameof(value)); + throw new ArgumentException("Invalid json type.", nameof(value)); } } } \ No newline at end of file diff --git a/src/Squidex.Domain.Apps.Read.MongoDb/Contents/MongoContentRepository.cs b/src/Squidex.Domain.Apps.Read.MongoDb/Contents/MongoContentRepository.cs index 9960878b8..516e7de81 100644 --- a/src/Squidex.Domain.Apps.Read.MongoDb/Contents/MongoContentRepository.cs +++ b/src/Squidex.Domain.Apps.Read.MongoDb/Contents/MongoContentRepository.cs @@ -88,11 +88,11 @@ namespace Squidex.Domain.Apps.Read.MongoDb.Contents } catch (NotSupportedException) { - throw new ValidationException("This odata operation is not supported"); + throw new ValidationException("This odata operation is not supported."); } catch (NotImplementedException) { - throw new ValidationException("This odata operation is not supported"); + throw new ValidationException("This odata operation is not supported."); } var contentEntities = await cursor.ToListAsync(); @@ -116,11 +116,11 @@ namespace Squidex.Domain.Apps.Read.MongoDb.Contents } catch (NotSupportedException) { - throw new ValidationException("This odata operation is not supported"); + throw new ValidationException("This odata operation is not supported."); } catch (NotImplementedException) { - throw new ValidationException("This odata operation is not supported"); + throw new ValidationException("This odata operation is not supported."); } return cursor.CountAsync(); diff --git a/src/Squidex.Domain.Apps.Read.MongoDb/Contents/Visitors/FilterBuilder.cs b/src/Squidex.Domain.Apps.Read.MongoDb/Contents/Visitors/FilterBuilder.cs index 42afd4681..203ca26c7 100644 --- a/src/Squidex.Domain.Apps.Read.MongoDb/Contents/Visitors/FilterBuilder.cs +++ b/src/Squidex.Domain.Apps.Read.MongoDb/Contents/Visitors/FilterBuilder.cs @@ -27,7 +27,7 @@ namespace Squidex.Domain.Apps.Read.MongoDb.Contents.Visitors } catch (ODataException ex) { - throw new ValidationException("Query $search clause not valid", new ValidationError(ex.Message)); + throw new ValidationException("Query $search clause not valid.", new ValidationError(ex.Message)); } if (search != null) @@ -42,7 +42,7 @@ namespace Squidex.Domain.Apps.Read.MongoDb.Contents.Visitors } catch (ODataException ex) { - throw new ValidationException("Query $filter clause not valid", new ValidationError(ex.Message)); + throw new ValidationException("Query $filter clause not valid.", new ValidationError(ex.Message)); } if (filter != null) diff --git a/src/Squidex.Domain.Apps.Write/Apps/AppClient.cs b/src/Squidex.Domain.Apps.Write/Apps/AppClient.cs index b39b4838c..b16d46982 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/AppClient.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/AppClient.cs @@ -45,7 +45,7 @@ namespace Squidex.Domain.Apps.Write.Apps { if (string.Equals(name, newName)) { - var error = new ValidationError("Client already has the name", "Id"); + var error = new ValidationError("Client already has the name.", "Id"); throw new ValidationException(message(), error); } diff --git a/src/Squidex.Domain.Apps.Write/Apps/AppClients.cs b/src/Squidex.Domain.Apps.Write/Apps/AppClients.cs index c5704c298..8a032e007 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/AppClients.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/AppClients.cs @@ -62,7 +62,7 @@ namespace Squidex.Domain.Apps.Write.Apps { if (clients.ContainsKey(clientId)) { - var error = new ValidationError("Client id is alreay part of the app", "Id"); + var error = new ValidationError("Client id is alreay part of the app.", "Id"); throw new ValidationException(message(), error); } diff --git a/src/Squidex.Domain.Apps.Write/Apps/AppCommandMiddleware.cs b/src/Squidex.Domain.Apps.Write/Apps/AppCommandMiddleware.cs index d299bb83a..ea84163be 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/AppCommandMiddleware.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/AppCommandMiddleware.cs @@ -54,7 +54,7 @@ namespace Squidex.Domain.Apps.Write.Apps new ValidationError($"An app with name '{command.Name}' already exists", nameof(CreateApp.Name)); - throw new ValidationException("Cannot create a new app", error); + throw new ValidationException("Cannot create a new app.", error); } await handler.CreateAsync(context, a => @@ -70,10 +70,10 @@ namespace Squidex.Domain.Apps.Write.Apps if (await userResolver.FindByIdAsync(command.ContributorId) == null) { var error = - new ValidationError("Cannot find contributor the contributor", + new ValidationError("Cannot find contributor the contributor.", nameof(AssignContributor.ContributorId)); - throw new ValidationException("Cannot assign contributor to app", error); + throw new ValidationException("Cannot assign contributor to app.", error); } await handler.UpdateAsync(context, a => @@ -85,9 +85,9 @@ namespace Squidex.Domain.Apps.Write.Apps if (maxContributors > 0 && a.ContributorCount > oldContributors && a.ContributorCount > maxContributors) { - var error = new ValidationError("You have reached your max number of contributors"); + var error = new ValidationError("You have reached your max number of contributors."); - throw new ValidationException("Cannot assign contributor to app", error); + throw new ValidationException("Cannot assign contributor to app.", error); } }); } @@ -100,7 +100,7 @@ namespace Squidex.Domain.Apps.Write.Apps new ValidationError($"The plan '{command.PlanId}' does not exists", nameof(CreateApp.Name)); - throw new ValidationException("Cannot change plan", error); + throw new ValidationException("Cannot change plan.", error); } return handler.UpdateAsync(context, async a => diff --git a/src/Squidex.Domain.Apps.Write/Apps/AppContributors.cs b/src/Squidex.Domain.Apps.Write/Apps/AppContributors.cs index fd12e6cc4..9d29f5e4c 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/AppContributors.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/AppContributors.cs @@ -55,7 +55,7 @@ namespace Squidex.Domain.Apps.Write.Apps { if (contributors.TryGetValue(contributorId, out var currentPermission) && currentPermission == permission) { - var error = new ValidationError("Contributor is already part of the app with same permissions", "ContributorId"); + var error = new ValidationError("Contributor is already part of the app with same permissions.", "ContributorId"); throw new ValidationException(message(), error); } @@ -69,7 +69,7 @@ namespace Squidex.Domain.Apps.Write.Apps if (contributorsCopy.All(x => x.Value != AppContributorPermission.Owner)) { - var error = new ValidationError("Contributor is the last owner", "ContributorId"); + var error = new ValidationError("Contributor is the last owner.", "ContributorId"); throw new ValidationException(message(), error); } diff --git a/src/Squidex.Domain.Apps.Write/Apps/Commands/AddLanguage.cs b/src/Squidex.Domain.Apps.Write/Apps/Commands/AddLanguage.cs index 2ca865b60..18c0d26d5 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/Commands/AddLanguage.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/Commands/AddLanguage.cs @@ -19,7 +19,7 @@ namespace Squidex.Domain.Apps.Write.Apps.Commands { if (Language == null) { - errors.Add(new ValidationError("Language cannot be null", nameof(Language))); + errors.Add(new ValidationError("Language cannot be null.", nameof(Language))); } } } diff --git a/src/Squidex.Domain.Apps.Write/Apps/Commands/AssignContributor.cs b/src/Squidex.Domain.Apps.Write/Apps/Commands/AssignContributor.cs index c6127045b..d0595d4d8 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/Commands/AssignContributor.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/Commands/AssignContributor.cs @@ -22,12 +22,12 @@ namespace Squidex.Domain.Apps.Write.Apps.Commands { if (string.IsNullOrWhiteSpace(ContributorId)) { - errors.Add(new ValidationError("Contributor id not assigned", nameof(ContributorId))); + errors.Add(new ValidationError("Contributor id not assigned.", nameof(ContributorId))); } if (!Permission.IsEnumValue()) { - errors.Add(new ValidationError("Permission is not valid", nameof(Permission))); + errors.Add(new ValidationError("Permission is not valid.", nameof(Permission))); } } } diff --git a/src/Squidex.Domain.Apps.Write/Apps/Commands/AttachClient.cs b/src/Squidex.Domain.Apps.Write/Apps/Commands/AttachClient.cs index a4d5758b7..9008316eb 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/Commands/AttachClient.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/Commands/AttachClient.cs @@ -21,7 +21,7 @@ namespace Squidex.Domain.Apps.Write.Apps.Commands { if (!Id.IsSlug()) { - errors.Add(new ValidationError("Client id must be a valid slug", nameof(Id))); + errors.Add(new ValidationError("Client id must be a valid slug.", nameof(Id))); } } } diff --git a/src/Squidex.Domain.Apps.Write/Apps/Commands/ChangePlan.cs b/src/Squidex.Domain.Apps.Write/Apps/Commands/ChangePlan.cs index b7c160acc..33c7dbdcc 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/Commands/ChangePlan.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/Commands/ChangePlan.cs @@ -21,7 +21,7 @@ namespace Squidex.Domain.Apps.Write.Apps.Commands { if (string.IsNullOrWhiteSpace(PlanId)) { - errors.Add(new ValidationError("PlanId is not defined", nameof(PlanId))); + errors.Add(new ValidationError("PlanId is not defined.", nameof(PlanId))); } } } diff --git a/src/Squidex.Domain.Apps.Write/Apps/Commands/CreateApp.cs b/src/Squidex.Domain.Apps.Write/Apps/Commands/CreateApp.cs index e612891b9..e200e2cb6 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/Commands/CreateApp.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/Commands/CreateApp.cs @@ -33,7 +33,7 @@ namespace Squidex.Domain.Apps.Write.Apps.Commands { if (!Name.IsSlug()) { - errors.Add(new ValidationError("Name must be a valid slug", nameof(Name))); + errors.Add(new ValidationError("Name must be a valid slug.", nameof(Name))); } } } diff --git a/src/Squidex.Domain.Apps.Write/Apps/Commands/RemoveContributor.cs b/src/Squidex.Domain.Apps.Write/Apps/Commands/RemoveContributor.cs index 6c2ec4a13..5f51d3481 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/Commands/RemoveContributor.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/Commands/RemoveContributor.cs @@ -19,7 +19,7 @@ namespace Squidex.Domain.Apps.Write.Apps.Commands { if (string.IsNullOrWhiteSpace(ContributorId)) { - errors.Add(new ValidationError("Contributor id not assigned", nameof(ContributorId))); + errors.Add(new ValidationError("Contributor id not assigned.", nameof(ContributorId))); } } } diff --git a/src/Squidex.Domain.Apps.Write/Apps/Commands/RemoveLanguage.cs b/src/Squidex.Domain.Apps.Write/Apps/Commands/RemoveLanguage.cs index b3a777076..678489dfc 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/Commands/RemoveLanguage.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/Commands/RemoveLanguage.cs @@ -19,7 +19,7 @@ namespace Squidex.Domain.Apps.Write.Apps.Commands { if (Language == null) { - errors.Add(new ValidationError("Language cannot be null", nameof(Language))); + errors.Add(new ValidationError("Language cannot be null.", nameof(Language))); } } } diff --git a/src/Squidex.Domain.Apps.Write/Apps/Commands/RevokeClient.cs b/src/Squidex.Domain.Apps.Write/Apps/Commands/RevokeClient.cs index 87afe99d0..5e66285ce 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/Commands/RevokeClient.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/Commands/RevokeClient.cs @@ -19,7 +19,7 @@ namespace Squidex.Domain.Apps.Write.Apps.Commands { if (!Id.IsSlug()) { - errors.Add(new ValidationError("Client id must be a valid slug", nameof(Id))); + errors.Add(new ValidationError("Client id must be a valid slug.", nameof(Id))); } } } diff --git a/src/Squidex.Domain.Apps.Write/Apps/Commands/UpdateClient.cs b/src/Squidex.Domain.Apps.Write/Apps/Commands/UpdateClient.cs index 6c5412bfa..0798a9b36 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/Commands/UpdateClient.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/Commands/UpdateClient.cs @@ -24,7 +24,7 @@ namespace Squidex.Domain.Apps.Write.Apps.Commands { if (!Id.IsSlug()) { - errors.Add(new ValidationError("Client id must be a valid slug", nameof(Id))); + errors.Add(new ValidationError("Client id must be a valid slug.", nameof(Id))); } if (string.IsNullOrWhiteSpace(Name) && Permission == null) diff --git a/src/Squidex.Domain.Apps.Write/Apps/Commands/UpdateLanguage.cs b/src/Squidex.Domain.Apps.Write/Apps/Commands/UpdateLanguage.cs index 5a069c928..1d0d28f86 100644 --- a/src/Squidex.Domain.Apps.Write/Apps/Commands/UpdateLanguage.cs +++ b/src/Squidex.Domain.Apps.Write/Apps/Commands/UpdateLanguage.cs @@ -25,7 +25,7 @@ namespace Squidex.Domain.Apps.Write.Apps.Commands { if (Language == null) { - errors.Add(new ValidationError("Language cannot be null", nameof(Language))); + errors.Add(new ValidationError("Language cannot be null.", nameof(Language))); } } } diff --git a/src/Squidex.Domain.Apps.Write/Contents/Commands/ContentDataCommand.cs b/src/Squidex.Domain.Apps.Write/Contents/Commands/ContentDataCommand.cs index 35ddea845..d80886ed9 100644 --- a/src/Squidex.Domain.Apps.Write/Contents/Commands/ContentDataCommand.cs +++ b/src/Squidex.Domain.Apps.Write/Contents/Commands/ContentDataCommand.cs @@ -20,7 +20,7 @@ namespace Squidex.Domain.Apps.Write.Contents.Commands { if (Data == null) { - errors.Add(new ValidationError("Data cannot be null", nameof(Data))); + errors.Add(new ValidationError("Data cannot be null.", nameof(Data))); } } } diff --git a/src/Squidex.Domain.Apps.Write/Schemas/Guards/SchemaGuard.cs b/src/Squidex.Domain.Apps.Write/Schemas/Guards/SchemaGuard.cs index e490e1a21..d57ee4f7b 100644 --- a/src/Squidex.Domain.Apps.Write/Schemas/Guards/SchemaGuard.cs +++ b/src/Squidex.Domain.Apps.Write/Schemas/Guards/SchemaGuard.cs @@ -21,7 +21,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards { var error = new ValidationError("Name must be a valid slug.", "Name"); - throw new ValidationException("Cannot create a new schema", error); + throw new ValidationException("Cannot create a new schema.", error); } } @@ -34,7 +34,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards { if (schema.IsPublished) { - throw new DomainException("Schema is already published"); + throw new DomainException("Schema is already published."); } } @@ -42,7 +42,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards { if (!schema.IsPublished) { - throw new DomainException("Schema is not published"); + throw new DomainException("Schema is not published."); } } } diff --git a/src/Squidex.Domain.Apps.Write/Schemas/SchemaCommandMiddleware.cs b/src/Squidex.Domain.Apps.Write/Schemas/SchemaCommandMiddleware.cs index 72b1b2a53..62464c92e 100644 --- a/src/Squidex.Domain.Apps.Write/Schemas/SchemaCommandMiddleware.cs +++ b/src/Squidex.Domain.Apps.Write/Schemas/SchemaCommandMiddleware.cs @@ -39,7 +39,7 @@ namespace Squidex.Domain.Apps.Write.Schemas new ValidationError($"A schema with name '{command.Name}' already exists", "Name", nameof(CreateSchema.Name)); - throw new ValidationException("Cannot create a new schema", error); + throw new ValidationException("Cannot create a new schema.", error); } await handler.CreateAsync(context, s => diff --git a/src/Squidex.Domain.Apps.Write/Webhooks/Commands/WebhookEditCommand.cs b/src/Squidex.Domain.Apps.Write/Webhooks/Commands/WebhookEditCommand.cs index 139bd743c..cb9d7503e 100644 --- a/src/Squidex.Domain.Apps.Write/Webhooks/Commands/WebhookEditCommand.cs +++ b/src/Squidex.Domain.Apps.Write/Webhooks/Commands/WebhookEditCommand.cs @@ -35,7 +35,7 @@ namespace Squidex.Domain.Apps.Write.Webhooks.Commands { if (Url == null || !Url.IsAbsoluteUri) { - errors.Add(new ValidationError("Url must be specified and absolute", nameof(Url))); + errors.Add(new ValidationError("Url must be specified and absolute.", nameof(Url))); } } } diff --git a/src/Squidex.Infrastructure/CQRS/Commands/DefaultDomainObjectFactory.cs b/src/Squidex.Infrastructure/CQRS/Commands/DefaultDomainObjectFactory.cs index b0d14e25d..4e1bbaba2 100644 --- a/src/Squidex.Infrastructure/CQRS/Commands/DefaultDomainObjectFactory.cs +++ b/src/Squidex.Infrastructure/CQRS/Commands/DefaultDomainObjectFactory.cs @@ -37,7 +37,7 @@ namespace Squidex.Infrastructure.CQRS.Commands if (domainObject.Version != -1) { - throw new InvalidOperationException("Must have a version of -1"); + throw new InvalidOperationException("Must have a version of -1."); } return domainObject; diff --git a/src/Squidex.Infrastructure/Guard.cs b/src/Squidex.Infrastructure/Guard.cs index 51db6b1f2..43cdd8caf 100644 --- a/src/Squidex.Infrastructure/Guard.cs +++ b/src/Squidex.Infrastructure/Guard.cs @@ -149,7 +149,7 @@ namespace Squidex.Infrastructure if (enumerable.Count == 0) { - throw new ArgumentException("Collection does not contain an item", parameterName); + throw new ArgumentException("Collection does not contain an item.", parameterName); } } @@ -179,7 +179,7 @@ namespace Squidex.Infrastructure { if (Equals(target, default(T))) { - throw new ArgumentException("Value cannot be an the default value", parameterName); + throw new ArgumentException("Value cannot be an the default value.", parameterName); } } diff --git a/src/Squidex.Infrastructure/Json/NamedGuidIdConverter.cs b/src/Squidex.Infrastructure/Json/NamedGuidIdConverter.cs index b71bf8951..a594d773e 100644 --- a/src/Squidex.Infrastructure/Json/NamedGuidIdConverter.cs +++ b/src/Squidex.Infrastructure/Json/NamedGuidIdConverter.cs @@ -32,12 +32,12 @@ namespace Squidex.Infrastructure.Json if (parts.Length < 2) { - throw new JsonException("Named id must have more than 2 parts divided by commata"); + throw new JsonException("Named id must have more than 2 parts divided by commata."); } if (!Guid.TryParse(parts[0], out var id)) { - throw new JsonException("Named id must be a valid guid"); + throw new JsonException("Named id must be a valid guid."); } return new NamedId(id, string.Join(",", parts.Skip(1))); diff --git a/src/Squidex.Infrastructure/Json/NamedLongIdConverter.cs b/src/Squidex.Infrastructure/Json/NamedLongIdConverter.cs index 2eeb6f690..1993fd1f2 100644 --- a/src/Squidex.Infrastructure/Json/NamedLongIdConverter.cs +++ b/src/Squidex.Infrastructure/Json/NamedLongIdConverter.cs @@ -32,12 +32,12 @@ namespace Squidex.Infrastructure.Json if (parts.Length < 2) { - throw new JsonException("Named id must have more than 2 parts divided by commata"); + throw new JsonException("Named id must have more than 2 parts divided by commata."); } if (!long.TryParse(parts[0], out var id)) { - throw new JsonException("Named id must be a valid long"); + throw new JsonException("Named id must be a valid long."); } return new NamedId(id, string.Join(",", parts.Skip(1))); diff --git a/src/Squidex.Infrastructure/Json/NamedStringIdConverter.cs b/src/Squidex.Infrastructure/Json/NamedStringIdConverter.cs index 085131631..ddc81b39c 100644 --- a/src/Squidex.Infrastructure/Json/NamedStringIdConverter.cs +++ b/src/Squidex.Infrastructure/Json/NamedStringIdConverter.cs @@ -32,7 +32,7 @@ namespace Squidex.Infrastructure.Json if (parts.Length < 2) { - throw new JsonException("Named id must have more than 2 parts divided by colon"); + throw new JsonException("Named id must have more than 2 parts divided by colon."); } return new NamedId(parts[0], string.Join(",", parts.Skip(1))); diff --git a/src/Squidex.Infrastructure/RefToken.cs b/src/Squidex.Infrastructure/RefToken.cs index bbb209dfc..2b329ce56 100644 --- a/src/Squidex.Infrastructure/RefToken.cs +++ b/src/Squidex.Infrastructure/RefToken.cs @@ -35,7 +35,7 @@ namespace Squidex.Infrastructure if (parts.Length < 2) { - throw new ArgumentException("Input must have more than 2 parts divided by colon", nameof(input)); + throw new ArgumentException("Input must have more than 2 parts divided by colon.", nameof(input)); } return new RefToken(parts[0], string.Join(":", parts.Skip(1))); diff --git a/src/Squidex/Config/Domain/AssetStoreModule.cs b/src/Squidex/Config/Domain/AssetStoreModule.cs index 683dbe70e..8f731bd9e 100644 --- a/src/Squidex/Config/Domain/AssetStoreModule.cs +++ b/src/Squidex/Config/Domain/AssetStoreModule.cs @@ -70,7 +70,7 @@ namespace Squidex.Config.Domain throw new ConfigurationException("Configure AssetStore AzureBlob connection string with 'assetStore:azureBlob:connectionString'."); } - var containerName = Configuration.GetValue("assetStore:azureBlob:containerName"); + var containerName = Configuration.GetValue("assetStore:azureBlob:containerName."); if (string.IsNullOrWhiteSpace(containerName)) { diff --git a/src/Squidex/Config/Domain/EventStoreModule.cs b/src/Squidex/Config/Domain/EventStoreModule.cs index ea282e94b..9ad79e6a7 100644 --- a/src/Squidex/Config/Domain/EventStoreModule.cs +++ b/src/Squidex/Config/Domain/EventStoreModule.cs @@ -57,7 +57,7 @@ namespace Squidex.Config.Domain throw new ConfigurationException("Configure EventStore MongoDb configuration with 'eventStore:mongoDb:configuration'."); } - var database = Configuration.GetValue("eventStore:mongoDb:database"); + var database = Configuration.GetValue("eventStore:mongoDb:database."); if (string.IsNullOrWhiteSpace(database)) { @@ -87,14 +87,14 @@ namespace Squidex.Config.Domain throw new ConfigurationException("Configure GetEventStore EventStore configuration with 'eventStore:getEventStore:configuration'."); } - var projectionHost = Configuration.GetValue("eventStore:getEventStore:projectionHost"); + var projectionHost = Configuration.GetValue("eventStore:getEventStore:projectionHost."); if (string.IsNullOrWhiteSpace(projectionHost)) { throw new ConfigurationException("Configure GetEventStore EventStore projection host with 'eventStore:getEventStore:projectionHost'."); } - var prefix = Configuration.GetValue("eventStore:getEventStore:prefix"); + var prefix = Configuration.GetValue("eventStore:getEventStore:prefix."); var connection = EventStoreConnection.Create(configuration); diff --git a/src/Squidex/Config/Domain/StoreMongoDbModule.cs b/src/Squidex/Config/Domain/StoreMongoDbModule.cs index f232207f3..b50fdd328 100644 --- a/src/Squidex/Config/Domain/StoreMongoDbModule.cs +++ b/src/Squidex/Config/Domain/StoreMongoDbModule.cs @@ -59,14 +59,14 @@ namespace Squidex.Config.Domain throw new ConfigurationException("Configure the Store MongoDb configuration with 'store:mongoDb:configuration'."); } - var database = Configuration.GetValue("store:mongoDb:database"); + var database = Configuration.GetValue("store:mongoDb:database."); if (string.IsNullOrWhiteSpace(database)) { throw new ConfigurationException("Configure the Store MongoDb database with 'store:mongoDb:database'."); } - var contentDatabase = Configuration.GetValue("store:mongoDb:contentDatabase"); + var contentDatabase = Configuration.GetValue("store:mongoDb:contentDatabase."); if (string.IsNullOrWhiteSpace(contentDatabase)) { diff --git a/src/Squidex/Controllers/Api/Users/UserManagementController.cs b/src/Squidex/Controllers/Api/Users/UserManagementController.cs index 1b5c2d11c..dfa27773d 100644 --- a/src/Squidex/Controllers/Api/Users/UserManagementController.cs +++ b/src/Squidex/Controllers/Api/Users/UserManagementController.cs @@ -110,7 +110,7 @@ namespace Squidex.Controllers.Api.Users } [HttpPut] - [Route("user-management/{id}/unlock/")] + [Route("user-management/{id}/unlock/.")] [ApiCosts(0)] public async Task UnlockUser(string id) { diff --git a/src/Squidex/Controllers/ControllerBase.cs b/src/Squidex/Controllers/ControllerBase.cs index d1fce5e8b..db2c972e1 100644 --- a/src/Squidex/Controllers/ControllerBase.cs +++ b/src/Squidex/Controllers/ControllerBase.cs @@ -34,7 +34,7 @@ namespace Squidex.Controllers if (appFeature == null) { - throw new InvalidOperationException("Not in a app context"); + throw new InvalidOperationException("Not in a app context."); } return appFeature.App; diff --git a/src/Squidex/Controllers/UI/Account/AccountController.cs b/src/Squidex/Controllers/UI/Account/AccountController.cs index 97cbc1b77..5685df698 100644 --- a/src/Squidex/Controllers/UI/Account/AccountController.cs +++ b/src/Squidex/Controllers/UI/Account/AccountController.cs @@ -101,7 +101,7 @@ namespace Squidex.Controllers.UI.Account } [HttpGet] - [Route("account/logout/")] + [Route("account/logout/.")] public async Task Logout(string logoutId) { var context = await interactions.GetLogoutContextAsync(logoutId); @@ -112,14 +112,14 @@ namespace Squidex.Controllers.UI.Account if (string.IsNullOrWhiteSpace(logoutUrl)) { - logoutUrl = urlOptions.Value.BuildUrl("logout"); + logoutUrl = urlOptions.Value.BuildUrl("logout."); } return Redirect(logoutUrl); } [HttpGet] - [Route("account/logout-redirect/")] + [Route("account/logout-redirect/.")] public async Task LogoutRedirect() { await signInManager.SignOutAsync(); @@ -128,7 +128,7 @@ namespace Squidex.Controllers.UI.Account } [HttpGet] - [Route("account/signup/")] + [Route("account/signup/.")] public IActionResult Signup(string returnUrl = null) { return LoginView(returnUrl, false, false); diff --git a/src/Squidex/Pipeline/CommandMiddlewares/EnrichWithActorCommandMiddleware.cs b/src/Squidex/Pipeline/CommandMiddlewares/EnrichWithActorCommandMiddleware.cs index 4c808578d..cdb144eba 100644 --- a/src/Squidex/Pipeline/CommandMiddlewares/EnrichWithActorCommandMiddleware.cs +++ b/src/Squidex/Pipeline/CommandMiddlewares/EnrichWithActorCommandMiddleware.cs @@ -34,7 +34,7 @@ namespace Squidex.Pipeline.CommandMiddlewares FindActorFromSubject() ?? FindActorFromClient(); - squidexCommand.Actor = actorToken ?? throw new SecurityException("No actor with subject or client id available"); + squidexCommand.Actor = actorToken ?? throw new SecurityException("No actor with subject or client id available."); } return next(); @@ -44,7 +44,7 @@ namespace Squidex.Pipeline.CommandMiddlewares { var subjectId = httpContextAccessor.HttpContext.User.OpenIdSubject(); - return subjectId == null ? null : new RefToken("subject", subjectId); + return subjectId == null ? null : new RefToken("subject.", subjectId); } private RefToken FindActorFromClient() diff --git a/src/Squidex/Pipeline/CommandMiddlewares/EnrichWithAppIdCommandMiddleware.cs b/src/Squidex/Pipeline/CommandMiddlewares/EnrichWithAppIdCommandMiddleware.cs index 64891814f..810199289 100644 --- a/src/Squidex/Pipeline/CommandMiddlewares/EnrichWithAppIdCommandMiddleware.cs +++ b/src/Squidex/Pipeline/CommandMiddlewares/EnrichWithAppIdCommandMiddleware.cs @@ -32,7 +32,7 @@ namespace Squidex.Pipeline.CommandMiddlewares if (appFeature == null) { - throw new InvalidOperationException("Cannot resolve app"); + throw new InvalidOperationException("Cannot resolve app."); } appCommand.AppId = new NamedId(appFeature.App.Id, appFeature.App.Name); diff --git a/tests/Squidex.Domain.Apps.Core.Tests/ContentValidationTests.cs b/tests/Squidex.Domain.Apps.Core.Tests/ContentValidationTests.cs index cfde8677f..f15b60ea1 100644 --- a/tests/Squidex.Domain.Apps.Core.Tests/ContentValidationTests.cs +++ b/tests/Squidex.Domain.Apps.Core.Tests/ContentValidationTests.cs @@ -36,7 +36,7 @@ namespace Squidex.Domain.Apps.Core errors.ShouldBeEquivalentTo( new List { - new ValidationError("unknown is not a known field", "unknown") + new ValidationError("unknown is not a known field.", "unknown") }); } @@ -56,7 +56,7 @@ namespace Squidex.Domain.Apps.Core errors.ShouldBeEquivalentTo( new List { - new ValidationError("my-field must be less than '100'", "my-field") + new ValidationError("my-field must be less than '100'.", "my-field") }); } @@ -77,8 +77,8 @@ namespace Squidex.Domain.Apps.Core errors.ShouldBeEquivalentTo( new List { - new ValidationError("my-field has an unsupported invariant value 'es'", "my-field"), - new ValidationError("my-field has an unsupported invariant value 'it'", "my-field") + new ValidationError("my-field has an unsupported invariant value 'es'.", "my-field"), + new ValidationError("my-field has an unsupported invariant value 'it'.", "my-field") }); } @@ -95,8 +95,8 @@ namespace Squidex.Domain.Apps.Core errors.ShouldBeEquivalentTo( new List { - new ValidationError("my-field (de) is required", "my-field"), - new ValidationError("my-field (en) is required", "my-field") + new ValidationError("my-field (de) is required.", "my-field"), + new ValidationError("my-field (en) is required.", "my-field") }); } @@ -113,7 +113,7 @@ namespace Squidex.Domain.Apps.Core errors.ShouldBeEquivalentTo( new List { - new ValidationError("my-field is required", "my-field") + new ValidationError("my-field is required.", "my-field") }); } @@ -134,7 +134,7 @@ namespace Squidex.Domain.Apps.Core errors.ShouldBeEquivalentTo( new List { - new ValidationError("my-field has an unsupported language value 'xx'", "my-field") + new ValidationError("my-field has an unsupported language value 'xx'.", "my-field") }); } @@ -174,8 +174,8 @@ namespace Squidex.Domain.Apps.Core errors.ShouldBeEquivalentTo( new List { - new ValidationError("my-field has an unsupported language value 'es'", "my-field"), - new ValidationError("my-field has an unsupported language value 'it'", "my-field") + new ValidationError("my-field has an unsupported language value 'es'.", "my-field"), + new ValidationError("my-field has an unsupported language value 'it'.", "my-field") }); } @@ -192,7 +192,7 @@ namespace Squidex.Domain.Apps.Core errors.ShouldBeEquivalentTo( new List { - new ValidationError("unknown is not a known field", "unknown") + new ValidationError("unknown is not a known field.", "unknown") }); } @@ -212,7 +212,7 @@ namespace Squidex.Domain.Apps.Core errors.ShouldBeEquivalentTo( new List { - new ValidationError("my-field must be less than '100'", "my-field") + new ValidationError("my-field must be less than '100'.", "my-field") }); } @@ -233,8 +233,8 @@ namespace Squidex.Domain.Apps.Core errors.ShouldBeEquivalentTo( new List { - new ValidationError("my-field has an unsupported invariant value 'es'", "my-field"), - new ValidationError("my-field has an unsupported invariant value 'it'", "my-field") + new ValidationError("my-field has an unsupported invariant value 'es'.", "my-field"), + new ValidationError("my-field has an unsupported invariant value 'it'.", "my-field") }); } @@ -281,7 +281,7 @@ namespace Squidex.Domain.Apps.Core errors.ShouldBeEquivalentTo( new List { - new ValidationError("my-field has an unsupported language value 'xx'", "my-field") + new ValidationError("my-field has an unsupported language value 'xx'.", "my-field") }); } @@ -302,8 +302,8 @@ namespace Squidex.Domain.Apps.Core errors.ShouldBeEquivalentTo( new List { - new ValidationError("my-field has an unsupported language value 'es'", "my-field"), - new ValidationError("my-field has an unsupported language value 'it'", "my-field") + new ValidationError("my-field has an unsupported language value 'es'.", "my-field"), + new ValidationError("my-field has an unsupported language value 'it'.", "my-field") }); } } diff --git a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/AssetsFieldPropertiesTests.cs b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/AssetsFieldPropertiesTests.cs index d6cb529a2..9fa7493ec 100644 --- a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/AssetsFieldPropertiesTests.cs +++ b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/AssetsFieldPropertiesTests.cs @@ -27,7 +27,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldPro errors.ShouldBeEquivalentTo( new List { - new ValidationError("Max items must be greater than min items", "MinItems", "MaxItems") + new ValidationError("Max items must be greater than min items.", "MinItems", "MaxItems") }); } } diff --git a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/BooleanFieldPropertiesTests.cs b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/BooleanFieldPropertiesTests.cs index 90c347632..c1dfc0dac 100644 --- a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/BooleanFieldPropertiesTests.cs +++ b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/BooleanFieldPropertiesTests.cs @@ -27,7 +27,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Editor is not a valid value", "Editor") + new ValidationError("Editor is not a valid value.", "Editor") }); } } diff --git a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/DateTimeFieldPropertiesTests.cs b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/DateTimeFieldPropertiesTests.cs index 3d14d2ddd..ba14c1575 100644 --- a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/DateTimeFieldPropertiesTests.cs +++ b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/DateTimeFieldPropertiesTests.cs @@ -44,7 +44,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Default value must be greater than min value", "DefaultValue") + new ValidationError("Default value must be greater than min value.", "DefaultValue") }); } @@ -58,7 +58,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Default value must be less than max value", "DefaultValue") + new ValidationError("Default value must be less than max value.", "DefaultValue") }); } @@ -72,7 +72,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Max value must be greater than min value", "MinValue", "MaxValue") + new ValidationError("Max value must be greater than min value.", "MinValue", "MaxValue") }); } @@ -86,7 +86,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Editor is not a valid value", "Editor") + new ValidationError("Editor is not a valid value.", "Editor") }); } @@ -100,7 +100,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Calculated default value is not valid", "CalculatedDefaultValue") + new ValidationError("Calculated default value is not valid.", "CalculatedDefaultValue") }); } @@ -114,7 +114,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Calculated default value and default value cannot be used together", "CalculatedDefaultValue", "DefaultValue") + new ValidationError("Calculated default value and default value cannot be used together.", "CalculatedDefaultValue", "DefaultValue") }); } diff --git a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/GeolocationFieldPropertiesTests.cs b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/GeolocationFieldPropertiesTests.cs index e3e73e70b..86dd4e822 100644 --- a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/GeolocationFieldPropertiesTests.cs +++ b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/GeolocationFieldPropertiesTests.cs @@ -27,7 +27,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Editor is not a valid value", "Editor") + new ValidationError("Editor is not a valid value.", "Editor") }); } } diff --git a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/NumberFieldPropertiesTests.cs b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/NumberFieldPropertiesTests.cs index 174f822a5..62e258708 100644 --- a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/NumberFieldPropertiesTests.cs +++ b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/NumberFieldPropertiesTests.cs @@ -43,7 +43,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Default value must be greater than min value", "DefaultValue") + new ValidationError("Default value must be greater than min value.", "DefaultValue") }); } @@ -57,7 +57,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Default value must be less than max value", "DefaultValue") + new ValidationError("Default value must be less than max value.", "DefaultValue") }); } @@ -71,7 +71,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Max value must be greater than min value", "MinValue", "MaxValue") + new ValidationError("Max value must be greater than min value.", "MinValue", "MaxValue") }); } @@ -85,7 +85,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Either allowed values or min and max value can be defined", "AllowedValues", "MinValue", "MaxValue") + new ValidationError("Either allowed values or min and max value can be defined.", "AllowedValues", "MinValue", "MaxValue") }); } @@ -99,7 +99,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Either allowed values or min and max value can be defined", "AllowedValues", "MinValue", "MaxValue") + new ValidationError("Either allowed values or min and max value can be defined.", "AllowedValues", "MinValue", "MaxValue") }); } @@ -113,7 +113,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Radio buttons or dropdown list need allowed values", "AllowedValues") + new ValidationError("Radio buttons or dropdown list need allowed values.", "AllowedValues") }); } @@ -127,7 +127,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Editor is not a valid value", "Editor") + new ValidationError("Editor is not a valid value.", "Editor") }); } } diff --git a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/ReferencesFieldPropertiesTests.cs b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/ReferencesFieldPropertiesTests.cs index ca358dfeb..fd35e49df 100644 --- a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/ReferencesFieldPropertiesTests.cs +++ b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/ReferencesFieldPropertiesTests.cs @@ -27,7 +27,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Max items must be greater than min items", "MinItems", "MaxItems") + new ValidationError("Max items must be greater than min items.", "MinItems", "MaxItems") }); } } diff --git a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/StringFieldPropertiesTests.cs b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/StringFieldPropertiesTests.cs index 371d87acf..04573e437 100644 --- a/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/StringFieldPropertiesTests.cs +++ b/tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/StringFieldPropertiesTests.cs @@ -28,7 +28,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Max length must be greater than min length", "MinLength", "MaxLength") + new ValidationError("Max length must be greater than min length.", "MinLength", "MaxLength") }); } @@ -42,7 +42,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Either allowed values or min and max length can be defined", "AllowedValues", "MinLength", "MaxLength") + new ValidationError("Either allowed values or min and max length can be defined.", "AllowedValues", "MinLength", "MaxLength") }); } @@ -56,7 +56,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Either allowed values or min and max length can be defined", "AllowedValues", "MinLength", "MaxLength") + new ValidationError("Either allowed values or min and max length can be defined.", "AllowedValues", "MinLength", "MaxLength") }); } @@ -70,7 +70,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Radio buttons or dropdown list need allowed values", "AllowedValues") + new ValidationError("Radio buttons or dropdown list need allowed values.", "AllowedValues") }); } @@ -84,7 +84,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Editor is not a valid value", "Editor") + new ValidationError("Editor is not a valid value.", "Editor") }); } @@ -98,7 +98,7 @@ namespace Squidex.Domain.Apps.Write.Schemas.Guards.FieldProperties errors.ShouldBeEquivalentTo( new List { - new ValidationError("Pattern is not a valid expression", "Pattern") + new ValidationError("Pattern is not a valid expression.", "Pattern") }); } } diff --git a/tests/Squidex.Domain.Apps.Write.Tests/TestHelpers/HandlerTestBase.cs b/tests/Squidex.Domain.Apps.Write.Tests/TestHelpers/HandlerTestBase.cs index 82491632a..601d0d27a 100644 --- a/tests/Squidex.Domain.Apps.Write.Tests/TestHelpers/HandlerTestBase.cs +++ b/tests/Squidex.Domain.Apps.Write.Tests/TestHelpers/HandlerTestBase.cs @@ -97,7 +97,7 @@ namespace Squidex.Domain.Apps.Write.TestHelpers if (!handler.IsCreated && shouldCreate) { - throw new InvalidOperationException("Create not called"); + throw new InvalidOperationException("Create not called."); } } @@ -109,7 +109,7 @@ namespace Squidex.Domain.Apps.Write.TestHelpers if (!handler.IsUpdated && shouldUpdate) { - throw new InvalidOperationException("Update not called"); + throw new InvalidOperationException("Update not called."); } } diff --git a/tests/Squidex.Infrastructure.Tests/GuardTests.cs b/tests/Squidex.Infrastructure.Tests/GuardTests.cs index 481f3305c..9c036f6aa 100644 --- a/tests/Squidex.Infrastructure.Tests/GuardTests.cs +++ b/tests/Squidex.Infrastructure.Tests/GuardTests.cs @@ -25,7 +25,7 @@ namespace Squidex.Infrastructure { public void Validate(IList errors) { - errors.Add(new ValidationError("error", "error")); + errors.Add(new ValidationError("error.", "error")); } }