public void SecurityServiceManager_RegisterUser_InvalidRequest_ErrorThrown(Boolean nullRequest,
                                                                                   String givenName,
                                                                                   String familyName,
                                                                                   String emailAddress,
                                                                                   Boolean nullClaims,
                                                                                   Boolean nullRoles,
                                                                                   Type exceptionType)
        {
            TestScenario           testScenario           = TestScenario.RegisterUserInvalidData;
            SecurityServiceManager securityServiceManager = this.SetupSecurityServiceManager(testScenario);

            RegisterUserRequest request = null;

            if (!nullRequest)
            {
                request = new RegisterUserRequest
                {
                    Claims       = nullClaims ? null : SecurityServiceManagerTestData.Claims,
                    GivenName    = givenName,
                    FamilyName   = familyName,
                    EmailAddress = emailAddress,
                    Password     = SecurityServiceManagerTestData.Password,
                    PhoneNumber  = SecurityServiceManagerTestData.PhoneNumber,
                    Roles        = nullRoles ? null : SecurityServiceManagerTestData.Roles
                };
            }

            Should.Throw(async() => { await securityServiceManager.RegisterUser(request, CancellationToken.None); }, exceptionType);
        }
        public void SecurityServiceManager_RegisterUser_Failed_ErrorThrown(TestScenario testScenario,
                                                                           Type exceptionType)
        {
            SecurityServiceManager securityServiceManager = this.SetupSecurityServiceManager(testScenario);

            RegisterUserRequest request = SecurityServiceManagerTestData.GetRegisterUserRequest;

            Should.Throw(async() => { await securityServiceManager.RegisterUser(request, CancellationToken.None); }, exceptionType);
        }
        //[InlineData(null)]
        //[InlineData("")]
        public async Task SecurityServiceManager_RegisterUser_UserIsRegistered(String password)
        {
            TestScenario           testScenario           = TestScenario.RegisterUserSuccess;
            SecurityServiceManager securityServiceManager = this.SetupSecurityServiceManager(testScenario);

            RegisterUserRequest request = SecurityServiceManagerTestData.GetRegisterUserRequest;

            request.Password = password;

            RegisterUserResponse response = await securityServiceManager.RegisterUser(request, CancellationToken.None);

            response.ShouldNotBeNull();
            response.UserId.ShouldNotBe(Guid.Empty);
        }