コード例 #1
0
        public UserController(AddUserCommand addUserCommand
                              , EditUserCommand editUserCommand
                              , DeleteUserCommand deleteUserCommand
                              , GetAdminAppUserByIdQuery getAdminAppUserByIdQuery
                              , EditOdsInstanceRegistrationForUserCommand editOdsInstanceRegistrationForUserCommand
                              , EditUserRoleCommand editUserRoleCommand
                              , GetRoleForUserQuery getRoleForUserQuery
                              , IGetOdsInstanceRegistrationsByUserIdQuery getOdsInstanceRegistrationsByUserIdQuery
                              , IGetOdsInstanceRegistrationsQuery getOdsInstanceRegistrationsQuery
                              , ITabDisplayService tabDisplayService
                              , SignInManager <AdminAppUser> signInManager
                              , UserManager <AdminAppUser> userManager
                              )
        {
            _addUserCommand           = addUserCommand;
            _editUserCommand          = editUserCommand;
            _deleteUserCommand        = deleteUserCommand;
            _getAdminAppUserByIdQuery = getAdminAppUserByIdQuery;
            _editOdsInstanceRegistrationForUserCommand = editOdsInstanceRegistrationForUserCommand;
            _editUserRoleCommand = editUserRoleCommand;
            _getRoleForUserQuery = getRoleForUserQuery;
            _getOdsInstanceRegistrationsByUserIdQuery = getOdsInstanceRegistrationsByUserIdQuery;
            _getOdsInstanceRegistrationsQuery         = getOdsInstanceRegistrationsQuery;
            _tabDisplayService = tabDisplayService;

            SignInManager = signInManager;
            UserManager   = userManager;
        }
コード例 #2
0
        public void ShouldGetAdminAppUserById()
        {
            var testUser = SetupUsers(1).Single();

            var command = new GetAdminAppUserByIdQuery();

            var result = command.Execute(testUser.Id);

            result.Email.ShouldBe(testUser.Email);
            result.UserName.ShouldBe(testUser.UserName);
        }
コード例 #3
0
        public void ShouldGetAdminAppUserById()
        {
            var testUser = SetupUsers(1).Single();

            Scoped <AdminAppIdentityDbContext>(identity =>
            {
                var command = new GetAdminAppUserByIdQuery(identity);

                var result = command.Execute(testUser.Id);

                result.Email.ShouldBe(testUser.Email);
                result.UserName.ShouldBe(testUser.UserName);
            });
        }