Package org.superbiz.deltaspike.repository

Examples of org.superbiz.deltaspike.repository.UserRepository.loadUser()


        final String userName = "gp";
        final String firstName = "Gerhard";
        final String lastName = "Petracek";

        UserRepository mockedUserRepository = mock(JpaUserRepository.class); //don't use the interface here to avoid issues with mockito and cdi proxies
        when(mockedUserRepository.loadUser(userName)).thenReturn(new User(userName, firstName, lastName.toUpperCase() /*just to illustrate that the mock-instance is used*/));
        mockManager.addMock(mockedUserRepository);


        this.windowContext.activateWindow("testWindow");

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.