Commit 87542768 authored by Matija Obreza's avatar Matija Obreza
Browse files

Fixed tests

parent 1465381a
...@@ -16,3 +16,4 @@ Thumbs.db ...@@ -16,3 +16,4 @@ Thumbs.db
/bower_components /bower_components
.tmp/ .tmp/
.sass-cache .sass-cache
velocity.log
package org.genesys2.server.persistence.domain.mock; package org.genesys2.server.persistence.domain.mock;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.genesys2.server.model.genesys.*; import org.genesys2.server.model.genesys.AccessionId;
import org.genesys2.server.model.genesys.Metadata;
import org.genesys2.server.model.genesys.Method;
import org.genesys2.server.model.genesys.Parameter;
import org.genesys2.server.model.genesys.ParameterCategory;
import org.genesys2.server.model.impl.Crop; import org.genesys2.server.model.impl.Crop;
import org.genesys2.server.persistence.domain.*; import org.genesys2.server.persistence.domain.AccessionTraitRepository;
import org.genesys2.server.persistence.domain.GenesysLowlevelRepository;
import org.genesys2.server.persistence.domain.MetadataMethodRepository;
import org.genesys2.server.persistence.domain.MetadataRepository;
import org.genesys2.server.persistence.domain.MethodRepository;
import org.genesys2.server.persistence.domain.ParameterCategoryRepository;
import org.genesys2.server.persistence.domain.ParameterRepository;
import org.genesys2.server.persistence.domain.TraitValueRepository;
import org.genesys2.server.security.AuthUserDetails; import org.genesys2.server.security.AuthUserDetails;
import org.genesys2.server.service.AclService; import org.genesys2.server.service.AclService;
import org.genesys2.server.service.HtmlSanitizer; import org.genesys2.server.service.HtmlSanitizer;
...@@ -13,7 +29,6 @@ import org.genesys2.server.service.TraitService; ...@@ -13,7 +29,6 @@ import org.genesys2.server.service.TraitService;
import org.genesys2.server.service.impl.GenesysServiceImpl; import org.genesys2.server.service.impl.GenesysServiceImpl;
import org.genesys2.spring.SecurityContextUtil; import org.genesys2.spring.SecurityContextUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
...@@ -22,18 +37,12 @@ import org.springframework.security.acls.domain.BasePermission; ...@@ -22,18 +37,12 @@ import org.springframework.security.acls.domain.BasePermission;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service @Service
@Transactional(readOnly = true) @Transactional(readOnly = true)
public class TraitServiceMock implements TraitService{ public class TraitServiceMock implements TraitService{
public static final Log LOG = LogFactory.getLog(GenesysServiceImpl.class); public static final Log LOG = LogFactory.getLog(GenesysServiceImpl.class);
@Autowired @Autowired
@Qualifier("genesysLowlevelRepositoryMock")
private GenesysLowlevelRepository genesysLowlevelRepository; private GenesysLowlevelRepository genesysLowlevelRepository;
@Autowired @Autowired
private AclService aclService; private AclService aclService;
......
...@@ -251,7 +251,7 @@ public abstract class AbstractRestTest { ...@@ -251,7 +251,7 @@ public abstract class AbstractRestTest {
} }
@Bean @Bean
public TokenStore tokenStore() { public JPATokenStore tokenStore() {
return new OAuth2JPATokenStoreImpl(); return new OAuth2JPATokenStoreImpl();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment