Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jmedinaebi committed Oct 31, 2022
1 parent c1b5f49 commit 9461be9
Show file tree
Hide file tree
Showing 12 changed files with 182 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: java
sudo: false
jdk:
- oraclejdk8
- oraclejdk11
script: mvn test
2 changes: 1 addition & 1 deletion feature-shortlabel-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
<version>${hibernate.jpa.version}</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>uk.ac.ebi.intact.maven</groupId>
<artifactId>intact-hibernate-master</artifactId>
<version>45-SNAPSHOT</version>
<version>46-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -20,7 +20,7 @@
<currentVersion>${project.version}</currentVersion>
<spring.version>4.3.30.RELEASE</spring.version>
<psi.jami.version>3.3.0-SNAPSHOT</psi.jami.version>
<intact.jami.version>1.4.0-SNAPSHOT</intact.jami.version>
<intact.jami.version>2.1.0-SNAPSHOT</intact.jami.version>
<intact.bridges.version>2.2.0-SNAPSHOT</intact.bridges.version>
<intact.core.version>2.7.0-SNAPSHOT</intact.core.version>
<maven.pmd.skip>true</maven.pmd.skip>
Expand Down
8 changes: 1 addition & 7 deletions protein-mapping/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
</dependency>

<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.10</version>
<version>${h2.version}</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/*
* Copyright 2001-2007 The European Bioinformatics Institute.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package uk.ac.ebi.intact.protein.mapping;

import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;
import uk.ac.ebi.intact.core.context.DataContext;
import uk.ac.ebi.intact.core.context.IntactContext;
import uk.ac.ebi.intact.core.persistence.dao.DaoFactory;
import uk.ac.ebi.intact.core.persister.CoreDeleter;
import uk.ac.ebi.intact.core.persister.CorePersister;
import uk.ac.ebi.intact.core.persister.PersisterHelper;
import uk.ac.ebi.intact.core.unit.IntactMockBuilder;

/**
* Base for all intact-tests.
*
* @author Bruno Aranda ([email protected])
* @version $Id$
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath*:/META-INF/jpa.test.spring.xml" })
@Transactional("transactionManager")
@DirtiesContext
public abstract class IntactBasicTestCase {

@Autowired
private ApplicationContext applicationContext;

private IntactMockBuilder mockBuilder;

@Before
public void prepareBasicTest() throws Exception {
mockBuilder = new IntactMockBuilder(getIntactContext().getConfig().getDefaultInstitution());
}

@After
public void afterBasicTest() throws Exception {
mockBuilder = null;
}

protected IntactContext getIntactContext() {
return (IntactContext) applicationContext.getBean("intactContext");
}

protected DataContext getDataContext() {
return getIntactContext().getDataContext();
}

protected DaoFactory getDaoFactory() {
return getDataContext().getDaoFactory();
}

protected IntactMockBuilder getMockBuilder() {
return mockBuilder;
}

public ConfigurableApplicationContext getSpringContext() {
return (ConfigurableApplicationContext) applicationContext;
}

@Deprecated
public PersisterHelper getPersisterHelper() {
return getIntactContext().getPersisterHelper();
}

public CorePersister getCorePersister() {
return getIntactContext().getCorePersister();
}

public CoreDeleter getCoreDeleter() {
return getIntactContext().getCoreDeleter();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.transaction.TransactionStatus;
import uk.ac.ebi.intact.bridges.ncbiblast.model.BlastProtein;
import uk.ac.ebi.intact.commons.util.Crc64;
import uk.ac.ebi.intact.core.context.DataContext;
import uk.ac.ebi.intact.core.context.IntactContext;
import uk.ac.ebi.intact.core.unit.IntactBasicTestCase;
import uk.ac.ebi.intact.model.*;
import uk.ac.ebi.intact.protein.mapping.IntactBasicTestCase;
import uk.ac.ebi.intact.protein.mapping.actions.exception.ActionProcessingException;
import uk.ac.ebi.intact.protein.mapping.factories.impl.DefaultReportsFactory;
import uk.ac.ebi.intact.protein.mapping.model.actionReport.MappingReport;
Expand All @@ -27,8 +26,7 @@
* @version $Id$
* @since <pre>17-May-2010</pre>
*/
@ContextConfiguration(locations = {"classpath*:/META-INF/jpa.test.spring.xml"})
public class FeatureRangeCheckingProcessTest extends IntactBasicTestCase{
public class FeatureRangeCheckingProcessTest extends IntactBasicTestCase {

private FeatureRangeCheckingProcess process;
private UpdateContext context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
import uk.ac.ebi.intact.commons.util.Crc64;
import uk.ac.ebi.intact.core.context.IntactContext;
import uk.ac.ebi.intact.core.unit.IntactBasicTestCase;
import uk.ac.ebi.intact.model.BioSource;
import uk.ac.ebi.intact.model.Protein;
import uk.ac.ebi.intact.protein.mapping.IntactBasicTestCase;
import uk.ac.ebi.intact.protein.mapping.actions.exception.ActionProcessingException;
import uk.ac.ebi.intact.protein.mapping.factories.impl.DefaultReportsFactory;
import uk.ac.ebi.intact.protein.mapping.model.actionReport.MappingReport;
Expand All @@ -24,7 +23,6 @@
* @version $Id$
* @since <pre>08-Apr-2010</pre>
*/
@ContextConfiguration(locations = {"classpath*:/META-INF/jpa.test.spring.xml"})
public class IntactCrc64SearchProcessTest extends IntactBasicTestCase {

private IntactCrc64SearchProcess process;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
import uk.ac.ebi.intact.core.context.IntactContext;
import uk.ac.ebi.intact.core.unit.IntactBasicTestCase;
import uk.ac.ebi.intact.model.BioSource;
import uk.ac.ebi.intact.model.Protein;
import uk.ac.ebi.intact.protein.mapping.IntactBasicTestCase;
import uk.ac.ebi.intact.protein.mapping.actions.exception.ActionProcessingException;
import uk.ac.ebi.intact.protein.mapping.factories.impl.DefaultReportsFactory;
import uk.ac.ebi.intact.protein.mapping.model.actionReport.MappingReport;
Expand All @@ -23,7 +22,6 @@
* @version $Id$
* @since <pre>28-Apr-2010</pre>
*/
@ContextConfiguration(locations = {"classpath*:/META-INF/jpa.test.spring.xml"})
public class IntactNameSearchProcessTest extends IntactBasicTestCase {

private IntactNameSearchProcess process;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

public class SwissprotRemappingProcessTest {

private SwissprotRemappingProcess process;
private BlastContext context;
private final SwissprotRemappingProcess process;
private final BlastContext context;

public SwissprotRemappingProcessTest(){
this.process = new SwissprotRemappingProcess(new DefaultReportsFactory());
Expand Down Expand Up @@ -67,7 +67,7 @@ public void test_SwissprotRemapping_failed(){
System.out.println(reports.get(1).getStatus().getLabel() + " " + reports.get(1).getStatus().getDescription());

Assert.assertNull(ac);
Assert.assertEquals(true, reports.get(1) instanceof DefaultBlastReport);
Assert.assertTrue(reports.get(1) instanceof DefaultBlastReport);
Assert.assertEquals(StatusLabel.FAILED, reports.get(1).getStatusLabel());

} catch (ActionProcessingException e) {
Expand Down Expand Up @@ -103,7 +103,7 @@ public void test_SwissprotRemapping_failed_WithoutOrganism(){
System.out.println(reports.get(1).getStatus().getLabel() + " " + reports.get(1).getStatus().getDescription());

Assert.assertNull(ac);
Assert.assertEquals(true, reports.get(1) instanceof DefaultBlastReport);
Assert.assertTrue(reports.get(1) instanceof DefaultBlastReport);
Assert.assertEquals(StatusLabel.FAILED, reports.get(1).getStatusLabel());

} catch (ActionProcessingException e) {
Expand Down Expand Up @@ -138,8 +138,8 @@ public void test_SwissprotRemapping_Unsuccessful_WithBadEnsemblGeneAndOrganism()
System.out.println(reports.get(2).getStatus().getLabel() + " " + reports.get(2).getStatus().getDescription());

Assert.assertNull(ac);
Assert.assertEquals(true, reports.get(2) instanceof DefaultBlastReport);
Assert.assertEquals(true, ((DefaultBlastReport) reports.get(2)).getBlastMatchingProteins().size() == 0);
Assert.assertTrue(reports.get(2) instanceof DefaultBlastReport);
Assert.assertTrue(((DefaultBlastReport) reports.get(2)).getBlastMatchingProteins().isEmpty());
Assert.assertEquals(StatusLabel.FAILED, reports.get(1).getStatus().getLabel());
Assert.assertEquals(StatusLabel.FAILED, reports.get(2).getStatus().getLabel());

Expand All @@ -149,7 +149,7 @@ public void test_SwissprotRemapping_Unsuccessful_WithBadEnsemblGeneAndOrganism()
}

@Test
public void test_SwissprotRemapping_failed_WithEnsemblGeneAndOrganism_LowIdentity(){
public void test_SwissprotRemapping_ToBeReviewed_WithEnsemblGeneAndOrganism_LowIdentity(){
String sequence = "MSAIQAAWPSGTECIAKYNFHGTAEQDLPFCKGDVLTIVAVTKDPNWYKAKNKVGREGII\n" +
"PANYVQKREGVKAGTKLSLMPWFHGKITREQAERLLYPPETGLFLVRESTNYPGDYTLCV\n" +
"SCDGKVEHYRIMYHASKLSIDEEVYFENLMQLVEHYTSDADGLCTRLIKPKVMEGTVAAQ\n" +
Expand All @@ -175,8 +175,8 @@ public void test_SwissprotRemapping_failed_WithEnsemblGeneAndOrganism_LowIdentit
System.out.println(reports.get(2).getStatus().getLabel() + " " + reports.get(2).getStatus().getDescription());

Assert.assertNull(ac);
Assert.assertEquals(true, reports.get(2) instanceof DefaultBlastReport);
Assert.assertEquals(false, ((DefaultBlastReport) reports.get(2)).getBlastMatchingProteins().size() > 0);
Assert.assertTrue(reports.get(2) instanceof DefaultBlastReport);
Assert.assertFalse(((DefaultBlastReport) reports.get(2)).getBlastMatchingProteins().isEmpty());
Assert.assertEquals(StatusLabel.FAILED, reports.get(1).getStatus().getLabel());
Assert.assertEquals(StatusLabel.TO_BE_REVIEWED, reports.get(2).getStatus().getLabel());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
import uk.ac.ebi.intact.commons.util.Crc64;
import uk.ac.ebi.intact.core.context.IntactContext;
import uk.ac.ebi.intact.core.unit.IntactBasicTestCase;
import uk.ac.ebi.intact.model.BioSource;
import uk.ac.ebi.intact.model.Protein;
import uk.ac.ebi.intact.protein.mapping.IntactBasicTestCase;
import uk.ac.ebi.intact.protein.mapping.actions.status.StatusLabel;
import uk.ac.ebi.intact.protein.mapping.model.actionReport.MappingReport;
import uk.ac.ebi.intact.protein.mapping.model.actionReport.impl.DefaultIntactCrc64Report;
Expand All @@ -24,7 +23,6 @@
* @version $Id$
* @since <pre>30-Apr-2010</pre>
*/
@ContextConfiguration(locations = {"classpath*:/META-INF/jpa.test.spring.xml"})
public class StrategyWithSequenceTest extends IntactBasicTestCase {

private StrategyWithSequence strategy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import uk.ac.ebi.intact.core.unit.IntactBasicTestCase;
import uk.ac.ebi.intact.protein.mapping.IntactBasicTestCase;
import uk.ac.ebi.intact.protein.mapping.strategies.exceptions.StrategyException;

import javax.xml.ws.soap.SOAPFaultException;
Expand Down
Loading

0 comments on commit 9461be9

Please sign in to comment.