コード例 #1
0
  @Test
  public void update_password() {
    createFullUser("uasv");
    createUpdateUserWithUpdateFields();

    updateUser();

    OSIAM_CONNECTOR.retrieveAccessToken("UserName", "Password", Scope.ADMIN);
  }
コード例 #2
0
  @Test
  public void replace_user_which_not_existing_raises_exception() {

    thrown.expect(NoResultException.class);
    thrown.expectMessage(Matchers.containsString("not found"));

    accessToken = OSIAM_CONNECTOR.retrieveAccessToken("marissa", "koala", Scope.ADMIN);
    UpdateUser patchedUser = new UpdateUser.Builder().build();
    OSIAM_CONNECTOR.updateUser(NOT_EXISTING_ID, patchedUser, accessToken);
  }
コード例 #3
0
  @Test
  public void update_attributes_does_not_change_the_password() {
    createFullUser("uadctp");
    createUpdateUserWithUpdateFieldsWithoutPassword();

    updateUser();

    assertThat(
        OSIAM_CONNECTOR.retrieveAccessToken(IRRELEVANT, "geheim", Scope.ADMIN), is(notNullValue()));
  }
コード例 #4
0
 @Before
 public void setUp() {
   accessToken = OSIAM_CONNECTOR.retrieveAccessToken("marissa", "koala", Scope.ADMIN);
 }