Examples of User


Examples of com.philip.journal.core.bean.User

    /** Initialize user, session and facade for test subclass reuse. */
    @Before
    public void setUp() {
        setSession(new HashMap<String, Object>());
        testUser = new User(JournalTestCommon.TEST_USERNAME, JournalTestCommon.TEST_PASSWORD,
                JournalTestCommon.TEST_CHECKSUM);
        getSession().put(Constant.CURRENT_USER, testUser);

        final ServiceFacade mockedFacade = Mockito.mock(ServiceFacade.class);
        getSession().put(BusinessServiceProxy.SERVICE_FACADE, mockedFacade);
View Full Code Here

Examples of com.poker.User

        String userToken = rc.getCookie("userToken");
       
        if (userIdStr != null && userToken != null){
            // get the User from the DAO
            Long userId = ObjectUtil.getValue(userIdStr, Long.class, null);
            User user = PokerUsersListener.getUser(userId);
           
            // Build the expectedUserToken from the user info
            // For this example, simplistic userToken (sha1(username,password))
            String expectedUserToken = Hashing.sha1().hashString(user.getUsername() + user.getId()).toString();
           
            if (Objects.equal(expectedUserToken, userToken)){
                // if valid, then, we create the AuthTocken with our User object
                AuthToken<User> authToken = new AuthToken<User>();
                authToken.setUser(user);
View Full Code Here

Examples of com.ponysdk.sample.client.datamodel.User

    @Override
    public void updateView(final Place place) {}

    private void doLogin() {
        final User user = new User();
        user.setID(0);
        user.setLogin(loginPageView.getLogin());
        user.setName(loginPageView.getLogin());
        user.setPassword(loginPageView.getPassword());

        UIContext.get().setApplicationAttribute(UISampleEntryPoint.USER, user);

        final UserLoggedInEvent loggedInEvent = new UserLoggedInEvent(LoginActivity.this, user);
        loggedInEvent.setBusinessMessage(loginPageView.getLogin() + " is now connected");
        fireEvent(loggedInEvent);

        log.info("Logged with #" + user.getLogin() + "/" + user.getPassword());

        goTo(new PagePlace("CheckBox"));
    }
View Full Code Here

Examples of com.porterhead.rest.user.domain.User

     *
     */
    @Transactional
    public AuthenticatedUserToken createUser(CreateUserRequest request, Role role) {
        validate(request);
        User searchedForUser = userRepository.findByEmailAddress(request.getUser().getEmailAddress());
        if (searchedForUser != null) {
            throw new DuplicateUserException();
        }

        User newUser = createNewUser(request, role);
        AuthenticatedUserToken token = new AuthenticatedUserToken(newUser.getUuid().toString(), createAuthorizationToken(newUser).getToken());
        userRepository.save(newUser);
        return token;
    }
View Full Code Here

Examples of com.proofpoint.http.client.TestFullJsonResponseHandler.User

    }

    @Test
    public void testValidSmile()
    {
        User response = handler.handle(null, createSmileResponse(OK, ImmutableMap.of(
                "name", "Joe",
                "age", 25,
                "extra", true
        )));

        assertEquals(response.getName(), "Joe");
        assertEquals(response.getAge(), 25);
    }
View Full Code Here

Examples of com.pugh.sockso.web.User

        assertNotContains( res.getOutput(), "A Playlist" );
    }
   
    public void testOnlyCurrentUsersPlaylistsListedWhenRequestedByUserUrl() throws Exception {
        action.setRequest( getRequest("/api/playlists/user") );
        action.setUser( new User(1,"foo") );
        action.handleRequest();
        assertContains( res.getOutput(), "A Playlist" );
        assertNotContains( res.getOutput(), "Foo Foo" );
        assertNotContains( res.getOutput(), "Bar Bar" );
    }
View Full Code Here

Examples of com.puppetlabs.geppetto.forge.v2.model.User

  }

  @Test
  public void testUserDetail() throws IOException {
    UserService service = getTestUserForge().createUserService();
    User user = service.get(TEST_USER);
    assertNotNull("Null user", user);
  }
View Full Code Here

Examples of com.pusher.client.channel.User

        inOrder.verify(mockEventListener).onUsersInformationReceived(eq(getChannelName()), argument.capture());

        assertEquals(1, argument.getValue().size());
        assertTrue(argument.getValue().toArray()[0] instanceof User);

        User user = (User) argument.getValue().toArray()[0];
        assertEquals(USER_ID, user.getId());
        assertEquals("{\"name\":\"Phil Leggetter\",\"twitter_id\":\"@leggetter\"}", user.getInfo());
    }
View Full Code Here

Examples of com.puzzlebazar.shared.model.User

    //               this saves a trip to the datastore.
    if (userKey == null) {
      return null;
    }

    User user = getUser(userKey);
    if (user == null) {
      createInvalidSession(getSessionId());
    } else {
      ((UserImpl) user).setAuthenticated(true);
    }
View Full Code Here

Examples of com.pv.mf.db.mock.example.simpledao.user.User

   ////
   ////
  
   public void saveOrUpdate(String userName, String password) {
      MockBuilder builder = _annotationFactory.createBuilder();
      User user = builder.getMock(User.class);
     
      user.setUserName(userName);
      user.setPassword(password);
     
      builder.saveOrUpdate();
   }
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.