Package com.sishuok.mvc.service

Examples of com.sishuok.mvc.service.UserService


        }

        @Bean
        public UserService userService() {
            //Mockito请参考 http://stamen.iteye.com/blog/1470066
            UserService userService = Mockito.mock(UserService.class);
            User user = new User();
            user.setId(1L);
            user.setName("zhang");
            Mockito.when(userService.findById(Mockito.any(Long.class))).thenReturn(user);
            return userService;
//            return new UserServiceImpl(); //此处也可以返回真实的UserService实现
        }
View Full Code Here

TOP

Related Classes of com.sishuok.mvc.service.UserService

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.