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