Examples of userId()


Examples of org.camunda.bpm.engine.identity.UserQuery.userId()

  @Test
  public void testChangeCredentials() {
    User initialUser = MockProvider.createMockUser();
    UserQuery sampleUserQuery = mock(UserQuery.class);
    when(identityServiceMock.createUserQuery()).thenReturn(sampleUserQuery);
    when(sampleUserQuery.userId(MockProvider.EXAMPLE_USER_ID)).thenReturn(sampleUserQuery);
    when(sampleUserQuery.singleResult()).thenReturn(initialUser);

    Authentication authentication = MockProvider.createMockAuthentication();
    when(identityServiceMock.getCurrentAuthentication()).thenReturn(authentication);
View Full Code Here

Examples of org.camunda.bpm.engine.identity.UserQuery.userId()

  @Test
  public void testChangeCredentialsWithWrongAuthenticatedUserPassword() {
    User initialUser = MockProvider.createMockUser();
    UserQuery sampleUserQuery = mock(UserQuery.class);
    when(identityServiceMock.createUserQuery()).thenReturn(sampleUserQuery);
    when(sampleUserQuery.userId(MockProvider.EXAMPLE_USER_ID)).thenReturn(sampleUserQuery);
    when(sampleUserQuery.singleResult()).thenReturn(initialUser);

    Authentication authentication = MockProvider.createMockAuthentication();
    when(identityServiceMock.getCurrentAuthentication()).thenReturn(authentication);
View Full Code Here

Examples of org.camunda.bpm.engine.identity.UserQuery.userId()

  @Test
  public void testPutCredentialsNonExistingUserFails() {
    UserQuery sampleUserQuery = mock(UserQuery.class);
    when(identityServiceMock.createUserQuery()).thenReturn(sampleUserQuery);
    when(sampleUserQuery.userId("aNonExistingUser")).thenReturn(sampleUserQuery);
    when(sampleUserQuery.singleResult()).thenReturn(null);

    UserCredentialsDto dto = new UserCredentialsDto();
    dto.setPassword("new-password");
View Full Code Here

Examples of org.camunda.bpm.engine.identity.UserQuery.userId()

    User initialUser = MockProvider.createMockUser();
    User userUpdate = MockProvider.createMockUserUpdate();

    UserQuery sampleUserQuery = mock(UserQuery.class);
    when(identityServiceMock.createUserQuery()).thenReturn(sampleUserQuery);
    when(sampleUserQuery.userId(MockProvider.EXAMPLE_USER_ID)).thenReturn(sampleUserQuery);
    when(sampleUserQuery.singleResult()).thenReturn(initialUser);

    UserProfileDto updateDto = UserProfileDto.fromUser(userUpdate);

    given()
View Full Code Here

Examples of org.camunda.bpm.engine.identity.UserQuery.userId()

  public void testPutProfileNonexistingFails() {
    User userUpdate = MockProvider.createMockUserUpdate();

    UserQuery sampleUserQuery = mock(UserQuery.class);
    when(identityServiceMock.createUserQuery()).thenReturn(sampleUserQuery);
    when(sampleUserQuery.userId("aNonExistingUser")).thenReturn(sampleUserQuery);
    when(sampleUserQuery.singleResult()).thenReturn(null);

    UserProfileDto updateDto = UserProfileDto.fromUser(userUpdate);

    given()
View Full Code Here

Examples of org.movsim.simulator.roadnetwork.RoadSegment.userId()

        RoadSegment sourceRoadSegment = Preconditions.checkNotNull(roadNetwork.findByUserId(parking.getSourceRoadId()),
                "cannot find roadSegment=" + parking.getSourceRoadId() + " specified as re-entrance from the road="
                        + roadSegment.id());
        TrafficSourceMicro trafficSource = new TrafficSourceMicro(defaultTrafficComposition, sourceRoadSegment);
        if (trafficSink.isLogging()) {
            trafficSource.setRecorder(new FileTrafficSourceData(sourceRoadSegment.userId()));
        }
        sourceRoadSegment.setTrafficSource(trafficSource);
        roadSegment.sink().setupParkingLot(parking, timeOffsetMillis, trafficSource);
    }
View Full Code Here

Examples of org.sonar.server.user.UserSession.userId()

        componentsByKeys.put(component.key(), component);
      }

      UserSession userSession = UserSession.get();
      List<Component> result = Lists.newArrayList();
      Collection<String> authorizedProjectKeys = db.authorizationDao().selectAuthorizedRootProjectsKeys(userSession.userId(), UserRole.USER);
      for (String key : componentsByKeys.keySet()) {
        if (authorizedProjectKeys.contains(key)) {
          result.add(componentsByKeys.get(key));
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.