Revision 62526
Added by Katerina Iatropoulou over 1 year ago
TestClass.java | ||
---|---|---|
16 | 16 |
import eu.dnetlib.data.claims.sql.SqlStore; |
17 | 17 |
import eu.dnetlib.data.claims.utils.*; |
18 | 18 |
import eu.dnetlib.data.emailSender.EmailSender; |
19 |
import org.apache.log4j.BasicConfigurator; |
|
20 |
import org.apache.log4j.Logger; |
|
19 |
import org.apache.logging.log4j.Level; |
|
20 |
import org.apache.logging.log4j.LogManager; |
|
21 |
import org.apache.logging.log4j.Logger; |
|
22 |
import org.apache.logging.log4j.core.config.Configurator; |
|
23 |
import org.apache.logging.log4j.core.config.DefaultConfiguration; |
|
21 | 24 |
import org.junit.Before; |
22 | 25 |
import org.junit.Test; |
23 | 26 |
import org.junit.runner.RunWith; |
... | ... | |
41 | 44 |
@ContextConfiguration(locations = {"springContext-claims.xml"}) |
42 | 45 |
@PropertySource("springContext-claims.properties") |
43 | 46 |
public class TestClass { |
44 |
private Logger log = Logger.getLogger(this.getClass()); |
|
47 |
private Logger log = LogManager.getLogger(this.getClass());
|
|
45 | 48 |
|
46 | 49 |
|
47 | 50 |
private SqlDAO sqlDAO; |
... | ... | |
66 | 69 |
|
67 | 70 |
@Before |
68 | 71 |
public void init() throws Exception { |
69 |
BasicConfigurator.configure(); |
|
72 |
Configurator.initialize(new DefaultConfiguration()); |
|
73 |
Configurator.setRootLevel(Level.INFO); |
|
70 | 74 |
ApplicationContext context = new ClassPathXmlApplicationContext("eu/dnetlib/data/claims/springContext-claims.xml"); |
71 | 75 |
|
72 | 76 |
directIndexHandler = context.getBean(DirectIndexHandler.class); |
... | ... | |
139 | 143 |
|
140 | 144 |
|
141 | 145 |
// claims = fetchClaimHandler.fetchClaimsByUser("argirok_1@hotmail.com",1,0,types, false); |
142 |
claims = fetchClaimHandler.fetchClaimsByContext("egi",100,0,null,"claim.claim_date",false,types,false); |
|
146 |
// claims = fetchClaimHandler.fetchClaimsByContext("egi",100,0,null,"claim.claim_date",false,types,false); |
|
147 |
// claims = fetchClaimHandler.fetchClaimsByContext("egi",100,0,null,"claim.claim_date",false,types,false); |
|
143 | 148 |
// (String openaireId, Integer limit, Integer offset, String keyword, String orderField, boolean descending, List<String> types, boolean addCurationInfo) throws Exception, SQLStoreException { |
144 | 149 |
// claims = fetchClaimHandler.fetchClaimsByUser("argirok@di.uoa.gr",3,0,null,"claim.claim_date",false,types,false); |
145 | 150 |
// |
Also available in: Unified diff
log4j2 integrated + uoa-global-parent