Search in sources :

Example 31 with UserQuery

use of org.nextprot.api.user.domain.UserQuery in project nextprot-api by calipho-sib.

the class UserResourceAuthorizationServiceTest method testUpdateUserQueryService.

@Test
public void testUpdateUserQueryService() {
    UserQuery query = mockUserQuery("bobleponge");
    Mockito.when(userQueryDao.getUserQueryById(anyLong())).thenReturn(query);
    userQueryService.updateUserQuery(query);
}
Also used : UserQuery(org.nextprot.api.user.domain.UserQuery) Test(org.junit.Test)

Example 32 with UserQuery

use of org.nextprot.api.user.domain.UserQuery in project nextprot-api by calipho-sib.

the class UserResourceAuthorizationServiceTest method testDeleteUserQueryService.

@Test
public void testDeleteUserQueryService() {
    UserQuery query = mockUserQuery("bobleponge");
    Mockito.when(userQueryDao.getUserQueryById(anyLong())).thenReturn(query);
    userQueryService.deleteUserQuery(query);
}
Also used : UserQuery(org.nextprot.api.user.domain.UserQuery) Test(org.junit.Test)

Example 33 with UserQuery

use of org.nextprot.api.user.domain.UserQuery in project nextprot-api by calipho-sib.

the class UserResourceAuthorizationServiceTest method testCreateUserQueryService.

@Test
public void testCreateUserQueryService() {
    UserQuery query = mockUserQuery("bobleponge");
    Mockito.when(userQueryDao.getUserQueryById(anyLong())).thenReturn(query);
    userQueryService.createUserQuery(query);
}
Also used : UserQuery(org.nextprot.api.user.domain.UserQuery) Test(org.junit.Test)

Aggregations

UserQuery (org.nextprot.api.user.domain.UserQuery)33 Test (org.junit.Test)20 UserResourceBaseTest (org.nextprot.api.user.dao.test.base.UserResourceBaseTest)10 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 MVCBaseSecurityTest (org.nextprot.api.web.dbunit.base.mvc.MVCBaseSecurityTest)4 ResultSet (java.sql.ResultSet)3 Date (java.util.Date)3 HashMap (java.util.HashMap)3 NextProtException (org.nextprot.api.commons.exception.NextProtException)3 NamedParameterJdbcTemplate (org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate)3 HashSet (java.util.HashSet)2 Map (java.util.Map)2 ApiMethod (org.jsondoc.core.annotation.ApiMethod)2 AbstractUnitBaseTest (org.nextprot.api.commons.dbunit.AbstractUnitBaseTest)2 MapSqlParameterSource (org.springframework.jdbc.core.namedparam.MapSqlParameterSource)2 PrintWriter (java.io.PrintWriter)1 URL (java.net.URL)1 List (java.util.List)1 SearchQueryException (org.nextprot.api.commons.exception.SearchQueryException)1 SparqlEndpoint (org.nextprot.api.rdf.service.SparqlEndpoint)1