diff --git a/src/EventHub.Domain.Shared/EventHubErrorCodes.cs b/src/EventHub.Domain.Shared/EventHubErrorCodes.cs index 8268063..148225b 100644 --- a/src/EventHub.Domain.Shared/EventHubErrorCodes.cs +++ b/src/EventHub.Domain.Shared/EventHubErrorCodes.cs @@ -9,7 +9,7 @@ public const string CantRegisterOrUnregisterForAPastEvent = "EventHub:CantRegisterOrUnregisterForAPastEvent"; public const string NotAuthorizedToUpdateOrganizationProfile = "EventHub:NotAuthorizedToUpdateOrganizationProfile"; public const string CapacityOfEventFull = "EventHub:CapacityOfEventFull"; - public const string CapacityCantBeLowerThanRegisteredUserCount = "EventHub:CapacityCantBeLowerThanRegisteredUserCount"; + public const string CapacityCanNotBeLowerThanRegisteredUserCount = "EventHub:CapacityCantBeLowerThanRegisteredUserCount"; public const string NotAuthorizedToUpdateEvent = "EventHub:NotAuthorizedToUpdateEvent"; public const string CantChangeEventTiming = "EventHub:CantChangeEventTiming"; public const string SessionTimeShouldBeInTheEventTime = "EventHub:SessionTimeShouldBeInTheEventTime"; diff --git a/src/EventHub.Domain/Events/EventManager.cs b/src/EventHub.Domain/Events/EventManager.cs index 3f87ac5..69171b1 100644 --- a/src/EventHub.Domain/Events/EventManager.cs +++ b/src/EventHub.Domain/Events/EventManager.cs @@ -53,7 +53,7 @@ namespace EventHub.Events var registeredUserCount = await _eventRegistrationRepository.CountAsync(x => x.EventId == @event.Id); if (capacity.Value < registeredUserCount) { - throw new BusinessException(EventHubErrorCodes.CapacityCantBeLowerThanRegisteredUserCount); + throw new BusinessException(EventHubErrorCodes.CapacityCanNotBeLowerThanRegisteredUserCount); } } diff --git a/src/EventHub.Domain/Events/Registrations/EventRegistrationManager.cs b/src/EventHub.Domain/Events/Registrations/EventRegistrationManager.cs index 2938903..3d21a00 100644 --- a/src/EventHub.Domain/Events/Registrations/EventRegistrationManager.cs +++ b/src/EventHub.Domain/Events/Registrations/EventRegistrationManager.cs @@ -32,7 +32,7 @@ namespace EventHub.Events.Registrations var registrationCount = await _eventRegistrationRepository.CountAsync(x => x.EventId == @event.Id); - if (@event.Capacity != null && registrationCount >= @event.Capacity) + if (@event.Capacity != null && registrationCount >= @event.Capacity) { throw new BusinessException(EventHubErrorCodes.CapacityOfEventFull) .WithData("EventTitle", @event.Title);