Browse Source

Added dots everywhere

pull/141/head
Sebastian Stehle 9 years ago
parent
commit
0bba44eaba
  1. 6
      src/Squidex.Domain.Apps.Core/LanguagesConfig.cs
  2. 2
      src/Squidex.Domain.Apps.Core/Schemas/NamedElementPropertiesBase.cs
  3. 2
      src/Squidex.Domain.Apps.Core/Schemas/Validators/RangeValidator.cs
  4. 2
      src/Squidex.Domain.Apps.Core/Schemas/Validators/StringLengthValidator.cs
  5. 4
      src/Squidex.Domain.Apps.Core/Scripting/ContentWrapper/JsonMapper.cs
  6. 8
      src/Squidex.Domain.Apps.Read.MongoDb/Contents/MongoContentRepository.cs
  7. 4
      src/Squidex.Domain.Apps.Read.MongoDb/Contents/Visitors/FilterBuilder.cs
  8. 2
      src/Squidex.Domain.Apps.Write/Apps/AppClient.cs
  9. 2
      src/Squidex.Domain.Apps.Write/Apps/AppClients.cs
  10. 12
      src/Squidex.Domain.Apps.Write/Apps/AppCommandMiddleware.cs
  11. 4
      src/Squidex.Domain.Apps.Write/Apps/AppContributors.cs
  12. 2
      src/Squidex.Domain.Apps.Write/Apps/Commands/AddLanguage.cs
  13. 4
      src/Squidex.Domain.Apps.Write/Apps/Commands/AssignContributor.cs
  14. 2
      src/Squidex.Domain.Apps.Write/Apps/Commands/AttachClient.cs
  15. 2
      src/Squidex.Domain.Apps.Write/Apps/Commands/ChangePlan.cs
  16. 2
      src/Squidex.Domain.Apps.Write/Apps/Commands/CreateApp.cs
  17. 2
      src/Squidex.Domain.Apps.Write/Apps/Commands/RemoveContributor.cs
  18. 2
      src/Squidex.Domain.Apps.Write/Apps/Commands/RemoveLanguage.cs
  19. 2
      src/Squidex.Domain.Apps.Write/Apps/Commands/RevokeClient.cs
  20. 2
      src/Squidex.Domain.Apps.Write/Apps/Commands/UpdateClient.cs
  21. 2
      src/Squidex.Domain.Apps.Write/Apps/Commands/UpdateLanguage.cs
  22. 2
      src/Squidex.Domain.Apps.Write/Contents/Commands/ContentDataCommand.cs
  23. 6
      src/Squidex.Domain.Apps.Write/Schemas/Guards/SchemaGuard.cs
  24. 2
      src/Squidex.Domain.Apps.Write/Schemas/SchemaCommandMiddleware.cs
  25. 2
      src/Squidex.Domain.Apps.Write/Webhooks/Commands/WebhookEditCommand.cs
  26. 2
      src/Squidex.Infrastructure/CQRS/Commands/DefaultDomainObjectFactory.cs
  27. 4
      src/Squidex.Infrastructure/Guard.cs
  28. 4
      src/Squidex.Infrastructure/Json/NamedGuidIdConverter.cs
  29. 4
      src/Squidex.Infrastructure/Json/NamedLongIdConverter.cs
  30. 2
      src/Squidex.Infrastructure/Json/NamedStringIdConverter.cs
  31. 2
      src/Squidex.Infrastructure/RefToken.cs
  32. 2
      src/Squidex/Config/Domain/AssetStoreModule.cs
  33. 6
      src/Squidex/Config/Domain/EventStoreModule.cs
  34. 4
      src/Squidex/Config/Domain/StoreMongoDbModule.cs
  35. 2
      src/Squidex/Controllers/Api/Users/UserManagementController.cs
  36. 2
      src/Squidex/Controllers/ControllerBase.cs
  37. 8
      src/Squidex/Controllers/UI/Account/AccountController.cs
  38. 4
      src/Squidex/Pipeline/CommandMiddlewares/EnrichWithActorCommandMiddleware.cs
  39. 2
      src/Squidex/Pipeline/CommandMiddlewares/EnrichWithAppIdCommandMiddleware.cs
  40. 34
      tests/Squidex.Domain.Apps.Core.Tests/ContentValidationTests.cs
  41. 2
      tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/AssetsFieldPropertiesTests.cs
  42. 2
      tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/BooleanFieldPropertiesTests.cs
  43. 12
      tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/DateTimeFieldPropertiesTests.cs
  44. 2
      tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/GeolocationFieldPropertiesTests.cs
  45. 14
      tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/NumberFieldPropertiesTests.cs
  46. 2
      tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/ReferencesFieldPropertiesTests.cs
  47. 12
      tests/Squidex.Domain.Apps.Write.Tests/Schemas/Guards/FieldProperties/StringFieldPropertiesTests.cs
  48. 4
      tests/Squidex.Domain.Apps.Write.Tests/TestHelpers/HandlerTestBase.cs
  49. 2
      tests/Squidex.Infrastructure.Tests/GuardTests.cs

6
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);
}

2
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.");
}
}

2
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;

2
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;

4
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));
}
}
}

8
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();

4
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)

2
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);
}

2
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);
}

12
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<AppDomainObject>(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<AppDomainObject>(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<AppDomainObject>(context, async a =>

4
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);
}

2
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)));
}
}
}

4
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)));
}
}
}

2
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)));
}
}
}

2
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)));
}
}
}

2
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)));
}
}
}

2
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)));
}
}
}

2
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)));
}
}
}

2
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)));
}
}
}

2
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)

2
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)));
}
}
}

2
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)));
}
}
}

6
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.");
}
}
}

2
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<SchemaDomainObject>(context, s =>

2
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)));
}
}
}

2
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;

4
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);
}
}

4
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<Guid>(id, string.Join(",", parts.Skip(1)));

4
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<long>(id, string.Join(",", parts.Skip(1)));

2
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<string>(parts[0], string.Join(",", parts.Skip(1)));

2
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)));

2
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<string>("assetStore:azureBlob:containerName");
var containerName = Configuration.GetValue<string>("assetStore:azureBlob:containerName.");
if (string.IsNullOrWhiteSpace(containerName))
{

6
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<string>("eventStore:mongoDb:database");
var database = Configuration.GetValue<string>("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<string>("eventStore:getEventStore:projectionHost");
var projectionHost = Configuration.GetValue<string>("eventStore:getEventStore:projectionHost.");
if (string.IsNullOrWhiteSpace(projectionHost))
{
throw new ConfigurationException("Configure GetEventStore EventStore projection host with 'eventStore:getEventStore:projectionHost'.");
}
var prefix = Configuration.GetValue<string>("eventStore:getEventStore:prefix");
var prefix = Configuration.GetValue<string>("eventStore:getEventStore:prefix.");
var connection = EventStoreConnection.Create(configuration);

4
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<string>("store:mongoDb:database");
var database = Configuration.GetValue<string>("store:mongoDb:database.");
if (string.IsNullOrWhiteSpace(database))
{
throw new ConfigurationException("Configure the Store MongoDb database with 'store:mongoDb:database'.");
}
var contentDatabase = Configuration.GetValue<string>("store:mongoDb:contentDatabase");
var contentDatabase = Configuration.GetValue<string>("store:mongoDb:contentDatabase.");
if (string.IsNullOrWhiteSpace(contentDatabase))
{

2
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<IActionResult> UnlockUser(string id)
{

2
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;

8
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<IActionResult> 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<IActionResult> 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);

4
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()

2
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<Guid>(appFeature.App.Id, appFeature.App.Name);

34
tests/Squidex.Domain.Apps.Core.Tests/ContentValidationTests.cs

@ -36,7 +36,7 @@ namespace Squidex.Domain.Apps.Core
errors.ShouldBeEquivalentTo(
new List<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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")
});
}
}

2
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<ValidationError>
{
new ValidationError("Max items must be greater than min items", "MinItems", "MaxItems")
new ValidationError("Max items must be greater than min items.", "MinItems", "MaxItems")
});
}
}

2
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<ValidationError>
{
new ValidationError("Editor is not a valid value", "Editor")
new ValidationError("Editor is not a valid value.", "Editor")
});
}
}

12
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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")
});
}

2
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<ValidationError>
{
new ValidationError("Editor is not a valid value", "Editor")
new ValidationError("Editor is not a valid value.", "Editor")
});
}
}

14
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
new ValidationError("Editor is not a valid value", "Editor")
new ValidationError("Editor is not a valid value.", "Editor")
});
}
}

2
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<ValidationError>
{
new ValidationError("Max items must be greater than min items", "MinItems", "MaxItems")
new ValidationError("Max items must be greater than min items.", "MinItems", "MaxItems")
});
}
}

12
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
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<ValidationError>
{
new ValidationError("Pattern is not a valid expression", "Pattern")
new ValidationError("Pattern is not a valid expression.", "Pattern")
});
}
}

4
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.");
}
}

2
tests/Squidex.Infrastructure.Tests/GuardTests.cs

@ -25,7 +25,7 @@ namespace Squidex.Infrastructure
{
public void Validate(IList<ValidationError> errors)
{
errors.Add(new ValidationError("error", "error"));
errors.Add(new ValidationError("error.", "error"));
}
}

Loading…
Cancel
Save