Search in sources :

Example 1 with UserQueryService

use of org.b3log.solo.service.UserQueryService in project solo by b3log.

the class LoginProcessorTestCase method init.

/**
     * Init.
     *
     * @throws Exception exception
     */
@Test
public void init() throws Exception {
    final InitService initService = getInitService();
    final JSONObject requestJSONObject = new JSONObject();
    requestJSONObject.put(User.USER_EMAIL, "test@gmail.com");
    requestJSONObject.put(User.USER_NAME, "Admin");
    requestJSONObject.put(User.USER_PASSWORD, "pass");
    initService.init(requestJSONObject);
    final UserQueryService userQueryService = getUserQueryService();
    Assert.assertNotNull(userQueryService.getUserByEmail("test@gmail.com"));
}
Also used : JSONObject(org.json.JSONObject) UserQueryService(org.b3log.solo.service.UserQueryService) InitService(org.b3log.solo.service.InitService) Test(org.testng.annotations.Test)

Example 2 with UserQueryService

use of org.b3log.solo.service.UserQueryService in project solo by b3log.

the class SitemapProcessorTestCase method init.

/**
     * Init.
     *
     * @throws Exception exception
     */
@Test
public void init() throws Exception {
    final InitService initService = getInitService();
    final JSONObject requestJSONObject = new JSONObject();
    requestJSONObject.put(User.USER_EMAIL, "test@gmail.com");
    requestJSONObject.put(User.USER_NAME, "Admin");
    requestJSONObject.put(User.USER_PASSWORD, "pass");
    initService.init(requestJSONObject);
    final UserQueryService userQueryService = getUserQueryService();
    Assert.assertNotNull(userQueryService.getUserByEmail("test@gmail.com"));
}
Also used : JSONObject(org.json.JSONObject) UserQueryService(org.b3log.solo.service.UserQueryService) InitService(org.b3log.solo.service.InitService) Test(org.testng.annotations.Test)

Example 3 with UserQueryService

use of org.b3log.solo.service.UserQueryService in project solo by b3log.

the class StatProcessorTestCase method init.

/**
     * Init.
     *
     * @throws Exception exception
     */
@Test
public void init() throws Exception {
    final InitService initService = getInitService();
    final JSONObject requestJSONObject = new JSONObject();
    requestJSONObject.put(User.USER_EMAIL, "test@gmail.com");
    requestJSONObject.put(User.USER_NAME, "Admin");
    requestJSONObject.put(User.USER_PASSWORD, "pass");
    initService.init(requestJSONObject);
    final UserQueryService userQueryService = getUserQueryService();
    Assert.assertNotNull(userQueryService.getUserByEmail("test@gmail.com"));
}
Also used : JSONObject(org.json.JSONObject) UserQueryService(org.b3log.solo.service.UserQueryService) InitService(org.b3log.solo.service.InitService) Test(org.testng.annotations.Test)

Example 4 with UserQueryService

use of org.b3log.solo.service.UserQueryService in project solo by b3log.

the class CaptchaProcessorTestCase method init.

/**
     * Init.
     *
     * @throws Exception exception
     */
@Test
public void init() throws Exception {
    final InitService initService = getInitService();
    final JSONObject requestJSONObject = new JSONObject();
    requestJSONObject.put(User.USER_EMAIL, "test@gmail.com");
    requestJSONObject.put(User.USER_NAME, "Admin");
    requestJSONObject.put(User.USER_PASSWORD, "pass");
    initService.init(requestJSONObject);
    final UserQueryService userQueryService = getUserQueryService();
    Assert.assertNotNull(userQueryService.getUserByEmail("test@gmail.com"));
}
Also used : JSONObject(org.json.JSONObject) UserQueryService(org.b3log.solo.service.UserQueryService) InitService(org.b3log.solo.service.InitService) Test(org.testng.annotations.Test)

Example 5 with UserQueryService

use of org.b3log.solo.service.UserQueryService in project solo by b3log.

the class CommentProcessorTestCase method init.

/**
     * Init.
     *
     * @throws Exception exception
     */
@Test
public void init() throws Exception {
    final InitService initService = getInitService();
    final JSONObject requestJSONObject = new JSONObject();
    requestJSONObject.put(User.USER_EMAIL, "test@gmail.com");
    requestJSONObject.put(User.USER_NAME, "Admin");
    requestJSONObject.put(User.USER_PASSWORD, "pass");
    initService.init(requestJSONObject);
    final UserQueryService userQueryService = getUserQueryService();
    Assert.assertNotNull(userQueryService.getUserByEmail("test@gmail.com"));
}
Also used : JSONObject(org.json.JSONObject) UserQueryService(org.b3log.solo.service.UserQueryService) InitService(org.b3log.solo.service.InitService) Test(org.testng.annotations.Test)

Aggregations

UserQueryService (org.b3log.solo.service.UserQueryService)15 JSONObject (org.json.JSONObject)14 InitService (org.b3log.solo.service.InitService)13 Test (org.testng.annotations.Test)13 IOException (java.io.IOException)2 LatkeBeanManager (org.b3log.latke.ioc.LatkeBeanManager)2 HttpServletRequest (javax.servlet.http.HttpServletRequest)1 HttpServletResponse (javax.servlet.http.HttpServletResponse)1 RequestReturnAdviceException (org.b3log.latke.servlet.advice.RequestReturnAdviceException)1 UserMgmtService (org.b3log.solo.service.UserMgmtService)1