Package org.onebusaway.users.services

Examples of org.onebusaway.users.services.UserDao


    User userA = createUser(1234);

    UserIndexKey key = new UserIndexKey(UserIndexTypes.PHONE_NUMBER,
        "12065551234");

    UserDao userDao = Mockito.mock(UserDao.class);
    _service.setUserDao(userDao);

    Mockito.when(userDao.getUserForId(1234)).thenReturn(userA);

    UserIndex migratedIndex = new UserIndex();
    migratedIndex.setId(key);
    migratedIndex.setUser(userA);
    migratedIndex.setCredentials("");
    Mockito.when(userDao.getUserIndexForId(key)).thenReturn(migratedIndex);

    UserIndexRegistrationService registrationService = Mockito.mock(UserIndexRegistrationService.class);
    _service.setUserIndexRegistrationService(registrationService);

    UserRegistration registration = new UserRegistration(1234, "5555");
View Full Code Here

TOP

Related Classes of org.onebusaway.users.services.UserDao

Copyright © 2018 www.massapicom. 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.