public void SecurityUserCreatedEvent_CanBeCreated_IsCreated()
        {
            SecurityUserCreatedEvent securityUserCreatedEvent =
                SecurityUserCreatedEvent.Create(PlayerTestData.AggregateId, PlayerTestData.SecurityUserId);

            securityUserCreatedEvent.ShouldNotBeNull();
            securityUserCreatedEvent.AggregateId.ShouldBe(PlayerTestData.AggregateId);
            securityUserCreatedEvent.EventId.ShouldNotBe(Guid.Empty);
            securityUserCreatedEvent.EventCreatedDateTime.ShouldNotBe(DateTime.MinValue);
            securityUserCreatedEvent.SecurityUserId.ShouldBe(PlayerTestData.SecurityUserId);
        }
        /// <summary>
        /// Creates the security user.
        /// </summary>
        /// <param name="securityUserId">The security user identifier.</param>
        public void CreateSecurityUser(Guid securityUserId)
        {
            Guard.ThrowIfInvalidGuid(securityUserId, typeof(ArgumentNullException), "A security user id is required to create a players security user");

            this.CheckIfPlayerHasBeenRegistered();
            this.CheckIfSecurityUserAlreadyCreated();

            // Create the domain event
            SecurityUserCreatedEvent securityUserCreatedEvent = SecurityUserCreatedEvent.Create(this.AggregateId, securityUserId);

            // Apply and pend
            this.ApplyAndPend(securityUserCreatedEvent);
        }