diff --git a/.classpath b/.classpath index f00842b..7b824e4 100755 --- a/.classpath +++ b/.classpath @@ -1,9 +1,10 @@ - + - - + + + @@ -12,14 +13,13 @@ - + - - - + + - + diff --git a/.github/workflows/build-gradle-project.yml b/.github/workflows/build-gradle-project.yml index 44877ec..d0db8b0 100644 --- a/.github/workflows/build-gradle-project.yml +++ b/.github/workflows/build-gradle-project.yml @@ -21,12 +21,12 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - java-version: '8' + java-version: '21' distribution: 'temurin' - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - gradle-version: 7.4 + gradle-version: 8.5 - name: Login to Docker Hub uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a diff --git a/Dockerfile b/Dockerfile index 559051d..e609593 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM alpine:3.19.1 +FROM --platform=linux/amd64 alpine:3.19.1 RUN apk update -RUN apk add openjdk8 +RUN apk add openjdk21 VOLUME /tmp ARG DEPENDENCY=target/dependency diff --git a/build.gradle b/build.gradle index dbc689e..6606052 100755 --- a/build.gradle +++ b/build.gradle @@ -3,15 +3,17 @@ buildscript { mavenCentral() } dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.6.3") + classpath("org.springframework.boot:spring-boot-gradle-plugin:3.2.5") } } plugins { - id 'com.palantir.docker' version '0.22.1' + id 'com.palantir.docker' version '0.35.0' + id 'org.springframework.boot' version '3.2.5' } group = 'kingstonduo' +version = '300' apply plugin: 'java' apply plugin: 'eclipse' @@ -19,34 +21,36 @@ apply plugin: 'idea' apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' -jar { - baseName='pegasus-data' - version= '2.5.0' -} repositories { mavenCentral() } -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +sourceCompatibility = '21' +targetCompatibility = '21' dependencies { + implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-test' - implementation 'org.springframework:spring-test:5.0.5.RELEASE' - implementation 'commons-io:commons-io:2.6' - implementation 'mysql:mysql-connector-java:8.0.15' - implementation 'org.apache.commons:commons-compress:1.17' - implementation 'org.apache.commons:commons-text:1.7' + + implementation 'commons-io:commons-io:2.16.1' + implementation 'com.mysql:mysql-connector-j:9.0.0' + implementation 'org.apache.commons:commons-compress:1.26.2' + implementation 'org.apache.commons:commons-text:1.12.0' implementation 'com.graphql-java:graphql-spring-boot-starter:5.0.2' implementation 'com.graphql-java:graphiql-spring-boot-starter:5.0.2' implementation 'com.graphql-java:graphql-java-tools:5.2.4' - testImplementation 'org.mockito:mockito-core' - testImplementation 'org.springframework.boot:spring-boot-starter-test:2.2.0.RELEASE' + implementation 'org.springframework.graphql:spring-graphql' implementation 'org.springframework.boot:spring-boot-starter-cache' implementation 'com.hazelcast:hazelcast-all:4.2.5' + + testImplementation('org.mockito:mockito-junit-jupiter:3.12.4') + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation 'org.springframework:spring-test:5.2.25.RELEASE' + testImplementation 'org.mockito:mockito-core' + } springBoot { @@ -75,7 +79,7 @@ def getCurrentGitBranch() { } catch (e) { } if (gitBranch == "develop" || gitBranch == "master"){ - return jar.version + return project.version }else{ return gitBranch } @@ -83,7 +87,7 @@ def getCurrentGitBranch() { } docker { - name "kingstonduo/${jar.baseName}:" + getCurrentGitBranch() + name "kingstonduo/pegasus-data:" + getCurrentGitBranch() copySpec.from(tasks.unpack.outputs).into("dependency") buildArgs(['DEPENDENCY': "dependency"]) } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 534a9cb..e985136 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip diff --git a/src/main/java/org/kpmp/Application.java b/src/main/java/org/kpmp/Application.java index 8b858c4..d6afb2a 100755 --- a/src/main/java/org/kpmp/Application.java +++ b/src/main/java/org/kpmp/Application.java @@ -24,7 +24,7 @@ public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurer() { @Override public void addCorsMappings(CorsRegistry registry) { - registry.addMapping("/graphql").allowedOrigins("http://localhost:3000"); + registry.addMapping("/graphql").allowedOrigins("*"); } }; } diff --git a/src/main/java/org/kpmp/Query.java b/src/main/java/org/kpmp/QueryController.java similarity index 74% rename from src/main/java/org/kpmp/Query.java rename to src/main/java/org/kpmp/QueryController.java index b3cf843..37ac1a5 100755 --- a/src/main/java/org/kpmp/Query.java +++ b/src/main/java/org/kpmp/QueryController.java @@ -29,12 +29,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; +import org.springframework.graphql.data.method.annotation.Argument; +import org.springframework.graphql.data.method.annotation.QueryMapping; +import org.springframework.stereotype.Controller; import com.coxautodev.graphql.tools.GraphQLQueryResolver; -@Component -public class Query implements GraphQLQueryResolver { +@Controller +public class QueryController implements GraphQLQueryResolver { private AutocompleteService autocompleteService; private CellTypeService cellTypeService; @@ -46,11 +48,11 @@ public class Query implements GraphQLQueryResolver { private RPExpressionDataService rpExpressionDataService; private ParticipantService participantService; - private AtlasMessageService atlasMessageService; - private Logger logger = LoggerFactory.getLogger(Query.class); + private AtlasMessageService atlasMessageService; + private Logger logger = LoggerFactory.getLogger(QueryController.class); @Autowired - public Query(AutocompleteService autocompleteService, CellTypeService cellTypeService, + public QueryController(AutocompleteService autocompleteService, CellTypeService cellTypeService, UmapDataService umapService, GeneExpressionSummaryService geneExpressionSummaryService, DataSummaryService dataSummaryService, ClusterHierarchyService clusterHierarchyService, RTExpressionDataService rtExpressionDataService, RPExpressionDataService rpExpressionDataService, @@ -68,16 +70,19 @@ public Query(AutocompleteService autocompleteService, CellTypeService cellTypeSe this.atlasMessageService = atlasMessageService; } - public List autocomplete(String searchTerm) throws IOException, Exception { + @QueryMapping + public List autocomplete(@Argument String searchTerm) throws IOException, Exception { return autocompleteService.query(searchTerm); } - public CellTypeHierarchy getCellTypeHierarchy() throws IOException { + @QueryMapping + public CellTypeHierarchy cellTypeHierarchy() throws IOException { return cellTypeService.getCellTypeHierarchy(); } - public List geneExpressionSummary(String dataType, String geneSymbol, - String cellType, String tissueType) throws IOException { + @QueryMapping + public List geneExpressionSummary(@Argument String dataType, @Argument String geneSymbol, + @Argument String cellType, @Argument String tissueType) throws IOException { List results = new ArrayList<>(); if (cellType.isEmpty()) { results = geneExpressionSummaryService.getByDataTypeTissueTypeAndGene(dataType, geneSymbol, tissueType); @@ -88,11 +93,13 @@ public List geneExpressionSummary(String dataTy return results; } - public List getClusterHieararchies(String cellType) throws IOException { + @QueryMapping + public List getClusterHieararchies(@Argument String cellType) throws IOException { return clusterHierarchyService.findClustersByCellType(cellType); } - public PlotData getUmapPlotData(String dataType, String geneSymbol, String tissueType) throws Exception { + @QueryMapping + public PlotData getUmapPlotData(@Argument String dataType, @Argument String geneSymbol, @Argument String tissueType) throws Exception { try { return umapService.getPlotData(dataType, geneSymbol, tissueType); } catch (Exception e) { @@ -101,6 +108,7 @@ public PlotData getUmapPlotData(String dataType, String geneSymbol, String tissu } } + @QueryMapping public List getDataTypeSummaryInformation() throws Exception { try { return geneExpressionSummaryService.getDataTypeSummaryInformation(); @@ -110,6 +118,7 @@ public List getDataTypeSummaryInformation() throws Exception { } } + @QueryMapping public List getSummaryData() throws Exception { try { return dataSummaryService.getSummaryData(); @@ -119,7 +128,8 @@ public List getSummaryData() throws Exception { } } - public List dataTypesForConcept(String geneSymbol, String clusterName) throws Exception { + @QueryMapping + public List dataTypesForConcept(@Argument String geneSymbol, @Argument String clusterName) throws Exception { if (geneSymbol != null && !geneSymbol.isEmpty()) { return geneExpressionSummaryService.findDataTypesByGene(geneSymbol); } else if (clusterName != null && !clusterName.isEmpty()) { @@ -129,7 +139,8 @@ public List dataTypesForConcept(String geneSymbol, String clusterName) t } - public RTExpressionByTissueType getRTGeneExpressionByTissue(String comparisonType, String geneSymbol) + @QueryMapping + public RTExpressionByTissueType getRTGeneExpressionByTissue(@Argument String comparisonType, @Argument String geneSymbol) throws Exception { try { return rtExpressionDataService.getByComparisonTypeAndGeneSymbolPerTissue(comparisonType, geneSymbol); @@ -139,7 +150,8 @@ public RTExpressionByTissueType getRTGeneExpressionByTissue(String comparisonTyp } } - public RPExpressionByTissueType getRPGeneExpressionByTissueAndProtein(String geneSymbol, String protein) throws Exception { + @QueryMapping + public RPExpressionByTissueType getRPGeneExpressionByTissueAndProtein(@Argument String geneSymbol, @Argument String protein) throws Exception { try { return rpExpressionDataService.getByGeneSymbolAndProteinPerTissue(geneSymbol, protein); } catch (Exception e) { @@ -148,7 +160,8 @@ public RPExpressionByTissueType getRPGeneExpressionByTissueAndProtein(String gen } } - public List getRTGeneExpressionByStructure(String structure) throws Exception { + @QueryMapping + public List getRTGeneExpressionByStructure(@Argument String structure) throws Exception { try { return rtExpressionDataService.getByStructure(structure); } catch (Exception e) { @@ -157,7 +170,8 @@ public List getRTGeneExpressionByStructure(String st } } - public List getRPGeneExpressionByStructure(String structure) throws Exception { + @QueryMapping + public List getRPGeneExpressionByStructure(@Argument String structure) throws Exception { try { return rpExpressionDataService.getByStructure(structure); } catch (Exception e) { @@ -165,7 +179,9 @@ public List getRPGeneExpressionByStructure(String structure) t throw e; } } - public List getRPGeneExpressionByTissue(String geneSymbol) + + @QueryMapping + public List getRPGeneExpressionByTissue(@Argument String geneSymbol) throws Exception { try { return rpExpressionDataService.getByGeneSymbolPerTissue(geneSymbol); @@ -175,35 +191,40 @@ public List getRPGeneExpressionByTissue(String geneSymbol) } } - public ParticipantDataTypeSummary getDataTypeInformationByParticipant(String redcapId) { + @QueryMapping + public ParticipantDataTypeSummary getDataTypeInformationByParticipant(@Argument String redcapId) { return participantService.getExperimentCounts(redcapId); } - public ParticipantRepoDataTypeSummary getRepoDataTypeInformationByParticipant(String redcapId) { + @QueryMapping + public ParticipantRepoDataTypeSummary getRepoDataTypeInformationByParticipant(@Argument String redcapId) { return participantService.getDataTypeCounts(redcapId); } - public ParticipantSummaryDataset participantSummaryDataset(String redcap_id) throws Exception { + @QueryMapping + public ParticipantSummaryDataset participantSummaryDataset(@Argument String redcapId) throws Exception { try { - return participantService.getParticipantSummaryDataset(redcap_id); + return participantService.getParticipantSummaryDataset(redcapId); } catch (Exception e) { logger.error(e.getMessage()); ParticipantSummaryDataset emptyResult = new ParticipantSummaryDataset(); - emptyResult.setRedcapId(redcap_id); + emptyResult.setRedcapId(redcapId); return emptyResult; } } - public ParticipantRepoDataTypeInformation getTotalParticipantFilesCount(String redcap_id) throws Exception { + @QueryMapping + public ParticipantRepoDataTypeInformation getTotalParticipantFilesCount(@Argument String redcapId) throws Exception { try { - return this.participantService.getTotalFilesCount(redcap_id); + return this.participantService.getTotalFilesCount(redcapId); } catch (Exception e) { logger.error(e.getMessage()); throw e; } } + @QueryMapping public List getTissueTypeSummaryData() throws Exception { try { return participantService.getTissueData(); @@ -213,6 +234,7 @@ public List getTissueTypeSummaryData() throws Exce } } + @QueryMapping public AtlasRepoSummaryResult getAtlasSummaryRows() throws Exception { try { return dataSummaryService.getAtlasRepoSummary(); @@ -222,6 +244,7 @@ public AtlasRepoSummaryResult getAtlasSummaryRows() throws Exception { } } + @QueryMapping public List getAtlasMessages() throws Exception { try{ return atlasMessageService.getAtlasMessage(); @@ -231,7 +254,8 @@ public List getAtlasMessages() throws Exception { } } - public List getExperimentalStrategyCountsByParticipant(String redcapId) { + @QueryMapping + public List getExperimentalStrategyCountsByParticipant(@Argument String redcapId) { return participantService.getExperimentalStrategyCountsByParticipant(redcapId); } } \ No newline at end of file diff --git a/src/main/java/org/kpmp/atlasMessage/AtlasMessage.java b/src/main/java/org/kpmp/atlasMessage/AtlasMessage.java index 1e0cd8b..fb37292 100644 --- a/src/main/java/org/kpmp/atlasMessage/AtlasMessage.java +++ b/src/main/java/org/kpmp/atlasMessage/AtlasMessage.java @@ -3,9 +3,9 @@ import java.io.Serializable; import java.util.Date; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; @Entity @Table(name = "atlas_messages") diff --git a/src/main/java/org/kpmp/autocomplete/AutocompleteService.java b/src/main/java/org/kpmp/autocomplete/AutocompleteService.java index f0d65e6..75f840c 100755 --- a/src/main/java/org/kpmp/autocomplete/AutocompleteService.java +++ b/src/main/java/org/kpmp/autocomplete/AutocompleteService.java @@ -59,33 +59,41 @@ public List convertCellTypesToAutocompleteResults(List autocompleteResults = new ArrayList<>(); List idsAdded = new ArrayList<>(); - for (CellType cellType : cellTypeListNoDupes) { - autocompleteResults.add(new AutocompleteResult(cellType.getCellType(), null, - Integer.toString(cellType.getCellTypeId()), TYPE_CELL_TYPE, cellType.getSynonymStringList())); - idsAdded.add(cellType.getCellTypeId()); - } + if (cellTypeListNoDupes != null){ + for (CellType cellType : cellTypeListNoDupes) { + autocompleteResults.add(new AutocompleteResult(cellType.getCellType(), null, + Integer.toString(cellType.getCellTypeId()), TYPE_CELL_TYPE, cellType.getSynonymStringList())); + idsAdded.add(cellType.getCellTypeId()); + } + } List subregionHits = new ArrayList<>(); - for (CellType subregion : subregions) { - - if (!(subregionHits.contains(subregion.getStructureSubregion()) - || idsAdded.contains(subregion.getCellTypeId()))) { - autocompleteResults.add(new AutocompleteResult(subregion.getStructureSubregion(), null, - Integer.toString(subregion.getCellTypeId()), TYPE_CELL_TYPE, null)); - subregionHits.add(subregion.getStructureSubregion()); - idsAdded.add(subregion.getCellTypeId()); - } - } + if (subregions != null){ + for (CellType subregion : subregions) { + + if (!(subregionHits.contains(subregion.getStructureSubregion()) + || idsAdded.contains(subregion.getCellTypeId()))) { + autocompleteResults.add(new AutocompleteResult(subregion.getStructureSubregion(), null, + Integer.toString(subregion.getCellTypeId()), TYPE_CELL_TYPE, null)); + subregionHits.add(subregion.getStructureSubregion()); + idsAdded.add(subregion.getCellTypeId()); + } + } + } + List regionHits = new ArrayList<>(); - for (CellType region : regions) { - if (!(regionHits.contains(region.getStructureRegion()) || idsAdded.contains(region.getCellTypeId()))) { - autocompleteResults.add(new AutocompleteResult(region.getStructureRegion(), null, - Integer.toString(region.getCellTypeId()), TYPE_CELL_TYPE, null)); - regionHits.add(region.getStructureRegion()); - idsAdded.add(region.getCellTypeId()); - } - } + if(regions != null){ + for (CellType region : regions) { + if (!(regionHits.contains(region.getStructureRegion()) || idsAdded.contains(region.getCellTypeId()))) { + autocompleteResults.add(new AutocompleteResult(region.getStructureRegion(), null, + Integer.toString(region.getCellTypeId()), TYPE_CELL_TYPE, null)); + regionHits.add(region.getStructureRegion()); + idsAdded.add(region.getCellTypeId()); + } + } + } + autocompleteResults.sort(new Comparator() { @Override diff --git a/src/main/java/org/kpmp/cellType/CellType.java b/src/main/java/org/kpmp/cellType/CellType.java index 0e872f5..f81ac15 100755 --- a/src/main/java/org/kpmp/cellType/CellType.java +++ b/src/main/java/org/kpmp/cellType/CellType.java @@ -5,13 +5,13 @@ import java.util.List; import java.util.Set; -import javax.annotation.Nullable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.OneToMany; -import javax.persistence.Table; +import jakarta.annotation.Nullable; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; import org.apache.commons.lang3.builder.HashCodeBuilder; diff --git a/src/main/java/org/kpmp/cellType/CellTypeRepository.java b/src/main/java/org/kpmp/cellType/CellTypeRepository.java index 0fc449b..81668fa 100755 --- a/src/main/java/org/kpmp/cellType/CellTypeRepository.java +++ b/src/main/java/org/kpmp/cellType/CellTypeRepository.java @@ -12,9 +12,9 @@ public interface CellTypeRepository extends CrudRepository { @Cacheable("cellTypeContainingOrSynonymContaining") - @Query(value = "SELECT ct.*, cs.* " + " FROM cell_type ct " + @Query(value = "SELECT ct.cell_type_id, ct.structure_region, ct.structure_subregion, ct.cell_type, ct.release_ver, ct.release_sunset, ct.cell_type_order, cs.cell_type_synonym " + " FROM cell_type ct " + " JOIN celltype_synonym cs ON (ct.cell_type_id = cs.cell_type_id AND cs.cell_type_synonym LIKE %:searchTerm%) " - + " UNION " + " SELECT ct.*, cs.* " + " FROM cell_type ct " + + " UNION " + " SELECT ct.cell_type_id, ct.structure_region, ct.structure_subregion, ct.cell_type, ct.release_ver, ct.release_sunset, ct.cell_type_order, cs.cell_type_synonym " + " FROM cell_type ct " + " LEFT JOIN celltype_synonym cs ON ct.cell_type_id = cs.cell_type_id " + " WHERE ct.cell_type LIKE %:searchTerm% ", nativeQuery = true) List findByCellTypeContainingOrSynonymContaining(@Param("searchTerm") String searchTerm); diff --git a/src/main/java/org/kpmp/cellType/CellTypeSynonym.java b/src/main/java/org/kpmp/cellType/CellTypeSynonym.java index f33f904..2d59594 100755 --- a/src/main/java/org/kpmp/cellType/CellTypeSynonym.java +++ b/src/main/java/org/kpmp/cellType/CellTypeSynonym.java @@ -2,14 +2,14 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; @Entity @Table(name = "celltype_synonym") diff --git a/src/main/java/org/kpmp/cellTypeSummary/ClusterHierarchy.java b/src/main/java/org/kpmp/cellTypeSummary/ClusterHierarchy.java index 4a26dd2..c633a9f 100755 --- a/src/main/java/org/kpmp/cellTypeSummary/ClusterHierarchy.java +++ b/src/main/java/org/kpmp/cellTypeSummary/ClusterHierarchy.java @@ -2,11 +2,11 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.Table; import org.springframework.lang.Nullable; diff --git a/src/main/java/org/kpmp/cluster/Cluster.java b/src/main/java/org/kpmp/cluster/Cluster.java index 1982e8a..cddf521 100755 --- a/src/main/java/org/kpmp/cluster/Cluster.java +++ b/src/main/java/org/kpmp/cluster/Cluster.java @@ -1,8 +1,8 @@ package org.kpmp.cluster; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; @Entity @Table(name = "cluster") diff --git a/src/main/java/org/kpmp/dataSummary/DataSummaryService.java b/src/main/java/org/kpmp/dataSummary/DataSummaryService.java index 3e479be..03add0c 100755 --- a/src/main/java/org/kpmp/dataSummary/DataSummaryService.java +++ b/src/main/java/org/kpmp/dataSummary/DataSummaryService.java @@ -25,9 +25,6 @@ public class DataSummaryService { private String BIOMARKERS; @Value("${experiment.category.biomarker}") private String BIOMARKER; - - private static final String CONTROLLED_ACCESS = "controlled"; - private static final String OPEN_ACCESS = "open"; private DataSummaryRepository dataSummaryRepository; private AtlasRepoSummaryRepository repoSummaryRepository; diff --git a/src/main/java/org/kpmp/dataSummary/DataSummaryValue.java b/src/main/java/org/kpmp/dataSummary/DataSummaryValue.java index 476517c..6f555ba 100755 --- a/src/main/java/org/kpmp/dataSummary/DataSummaryValue.java +++ b/src/main/java/org/kpmp/dataSummary/DataSummaryValue.java @@ -2,10 +2,10 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import org.springframework.lang.Nullable; diff --git a/src/main/java/org/kpmp/dataSummary/ExperimentalStrategyValue.java b/src/main/java/org/kpmp/dataSummary/ExperimentalStrategyValue.java index 99d0887..7cb2bed 100644 --- a/src/main/java/org/kpmp/dataSummary/ExperimentalStrategyValue.java +++ b/src/main/java/org/kpmp/dataSummary/ExperimentalStrategyValue.java @@ -2,10 +2,10 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.Table; @Entity @Table(name = "repository_summary_v") diff --git a/src/main/java/org/kpmp/errors/ErrorController.java b/src/main/java/org/kpmp/errors/ErrorController.java index 93fbdc0..4f0c951 100755 --- a/src/main/java/org/kpmp/errors/ErrorController.java +++ b/src/main/java/org/kpmp/errors/ErrorController.java @@ -1,6 +1,6 @@ package org.kpmp.errors; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.kpmp.logging.LoggingService; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/main/java/org/kpmp/file/ARFileInfo.java b/src/main/java/org/kpmp/file/ARFileInfo.java index 80141c4..aba0b97 100644 --- a/src/main/java/org/kpmp/file/ARFileInfo.java +++ b/src/main/java/org/kpmp/file/ARFileInfo.java @@ -1,8 +1,8 @@ package org.kpmp.file; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; @Entity @Table(name = "ar_file_info") diff --git a/src/main/java/org/kpmp/gene/GeneService.java b/src/main/java/org/kpmp/gene/GeneService.java index ed16a67..6f58dfe 100755 --- a/src/main/java/org/kpmp/gene/GeneService.java +++ b/src/main/java/org/kpmp/gene/GeneService.java @@ -11,7 +11,7 @@ import java.util.Collections; import java.util.List; -import org.kpmp.Query; +import org.kpmp.QueryController; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cache.annotation.Cacheable; @@ -23,7 +23,7 @@ @Service public class GeneService { - private Logger logger = LoggerFactory.getLogger(Query.class); + private Logger logger = LoggerFactory.getLogger(QueryController.class); static final String GET_MY_GENE_INFO_QUERY_SYMBOL = "http://mygene.info/v3/query?q=symbol:%s%%2A&species=9606&fields=symbol,name,taxid,entrezgene,alias&size=100"; static final String GET_MY_GENE_INFO_QUERY_ALIAS = "http://mygene.info/v3/query?q=alias:%s%%2A%%20NOT%%20symbol:%s%%2A&species=9606&fields=symbol,name,taxid,entrezgene,alias&size=100"; diff --git a/src/main/java/org/kpmp/geneExpression/RPExpressionData.java b/src/main/java/org/kpmp/geneExpression/RPExpressionData.java index 0b67b29..8865b40 100755 --- a/src/main/java/org/kpmp/geneExpression/RPExpressionData.java +++ b/src/main/java/org/kpmp/geneExpression/RPExpressionData.java @@ -1,9 +1,9 @@ package org.kpmp.geneExpression; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; @Entity @Table(name = "rp_expression") diff --git a/src/main/java/org/kpmp/geneExpression/RTExpressionDataAllSegments.java b/src/main/java/org/kpmp/geneExpression/RTExpressionDataAllSegments.java index da63cbf..c598fd9 100755 --- a/src/main/java/org/kpmp/geneExpression/RTExpressionDataAllSegments.java +++ b/src/main/java/org/kpmp/geneExpression/RTExpressionDataAllSegments.java @@ -2,10 +2,10 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; @Entity @Table(name = "rt_segments") diff --git a/src/main/java/org/kpmp/geneExpression/RTExpressionDataGTI.java b/src/main/java/org/kpmp/geneExpression/RTExpressionDataGTI.java index 2b99c90..ffcf28f 100755 --- a/src/main/java/org/kpmp/geneExpression/RTExpressionDataGTI.java +++ b/src/main/java/org/kpmp/geneExpression/RTExpressionDataGTI.java @@ -2,10 +2,10 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; @Entity @Table(name = "rt_gti") diff --git a/src/main/java/org/kpmp/geneExpression/SCExpressionData.java b/src/main/java/org/kpmp/geneExpression/SCExpressionData.java index 7a738ff..9b40ab0 100755 --- a/src/main/java/org/kpmp/geneExpression/SCExpressionData.java +++ b/src/main/java/org/kpmp/geneExpression/SCExpressionData.java @@ -2,14 +2,15 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - import org.json.JSONException; import org.json.JSONObject; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; + + @Entity @Table(name = "sc_feature_data") class SCExpressionData implements Serializable { diff --git a/src/main/java/org/kpmp/geneExpression/SNExpressionData.java b/src/main/java/org/kpmp/geneExpression/SNExpressionData.java index 1e21871..aaba6bf 100755 --- a/src/main/java/org/kpmp/geneExpression/SNExpressionData.java +++ b/src/main/java/org/kpmp/geneExpression/SNExpressionData.java @@ -2,10 +2,10 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import org.json.JSONException; import org.json.JSONObject; diff --git a/src/main/java/org/kpmp/geneExpressionSummary/regionalProteomics/RPParticipantValue.java b/src/main/java/org/kpmp/geneExpressionSummary/regionalProteomics/RPParticipantValue.java index c36dbba..8f93eda 100755 --- a/src/main/java/org/kpmp/geneExpressionSummary/regionalProteomics/RPParticipantValue.java +++ b/src/main/java/org/kpmp/geneExpressionSummary/regionalProteomics/RPParticipantValue.java @@ -3,7 +3,7 @@ import org.kpmp.geneExpressionSummary.Participant; import org.kpmp.geneExpressionSummary.ParticipantId; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; @Entity diff --git a/src/main/java/org/kpmp/geneExpressionSummary/regionalTranscriptomics/RTParticipantValue.java b/src/main/java/org/kpmp/geneExpressionSummary/regionalTranscriptomics/RTParticipantValue.java index e14162a..9cfb53c 100755 --- a/src/main/java/org/kpmp/geneExpressionSummary/regionalTranscriptomics/RTParticipantValue.java +++ b/src/main/java/org/kpmp/geneExpressionSummary/regionalTranscriptomics/RTParticipantValue.java @@ -5,11 +5,11 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.Table; @Entity @Table(name = "rt_participant_tissue_v") diff --git a/src/main/java/org/kpmp/geneExpressionSummary/singleCell/SCRNAGeneExpressionExpressionSummaryValue.java b/src/main/java/org/kpmp/geneExpressionSummary/singleCell/SCRNAGeneExpressionExpressionSummaryValue.java index cd4e971..0daa17b 100755 --- a/src/main/java/org/kpmp/geneExpressionSummary/singleCell/SCRNAGeneExpressionExpressionSummaryValue.java +++ b/src/main/java/org/kpmp/geneExpressionSummary/singleCell/SCRNAGeneExpressionExpressionSummaryValue.java @@ -3,12 +3,12 @@ import java.beans.Transient; import java.io.Serializable; -import javax.annotation.Nullable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.Table; +import jakarta.annotation.Nullable; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.Table; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; diff --git a/src/main/java/org/kpmp/geneExpressionSummary/singleCell/SCRNAParticipantValue.java b/src/main/java/org/kpmp/geneExpressionSummary/singleCell/SCRNAParticipantValue.java index d5a6e26..9557dc8 100755 --- a/src/main/java/org/kpmp/geneExpressionSummary/singleCell/SCRNAParticipantValue.java +++ b/src/main/java/org/kpmp/geneExpressionSummary/singleCell/SCRNAParticipantValue.java @@ -4,11 +4,11 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.Table; @Entity @Table(name = "sn_participant_tissue_v") diff --git a/src/main/java/org/kpmp/geneExpressionSummary/singleNucleus/SNRNAGeneExpressionExpressionSummaryValue.java b/src/main/java/org/kpmp/geneExpressionSummary/singleNucleus/SNRNAGeneExpressionExpressionSummaryValue.java index 294b99c..37c5d43 100755 --- a/src/main/java/org/kpmp/geneExpressionSummary/singleNucleus/SNRNAGeneExpressionExpressionSummaryValue.java +++ b/src/main/java/org/kpmp/geneExpressionSummary/singleNucleus/SNRNAGeneExpressionExpressionSummaryValue.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.Table; -import javax.persistence.Transient; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; import org.kpmp.DataTypeEnum; import org.kpmp.geneExpressionSummary.GeneExpressionId; diff --git a/src/main/java/org/kpmp/geneExpressionSummary/singleNucleus/SNRNAParticipantValue.java b/src/main/java/org/kpmp/geneExpressionSummary/singleNucleus/SNRNAParticipantValue.java index c6a0d3f..49f7fd0 100755 --- a/src/main/java/org/kpmp/geneExpressionSummary/singleNucleus/SNRNAParticipantValue.java +++ b/src/main/java/org/kpmp/geneExpressionSummary/singleNucleus/SNRNAParticipantValue.java @@ -5,11 +5,11 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.Table; @Entity @Table(name = "sn_participant_tissue_v") diff --git a/src/main/java/org/kpmp/logging/LoggingService.java b/src/main/java/org/kpmp/logging/LoggingService.java index 57597c0..5404392 100755 --- a/src/main/java/org/kpmp/logging/LoggingService.java +++ b/src/main/java/org/kpmp/logging/LoggingService.java @@ -1,6 +1,6 @@ package org.kpmp.logging; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/kpmp/participant/ParticipantRepoData.java b/src/main/java/org/kpmp/participant/ParticipantRepoData.java index 7bd6443..880aa77 100644 --- a/src/main/java/org/kpmp/participant/ParticipantRepoData.java +++ b/src/main/java/org/kpmp/participant/ParticipantRepoData.java @@ -1,8 +1,8 @@ package org.kpmp.participant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; @Entity diff --git a/src/main/java/org/kpmp/participant/ParticipantSummaryDataset.java b/src/main/java/org/kpmp/participant/ParticipantSummaryDataset.java index c90a5a0..ff79979 100755 --- a/src/main/java/org/kpmp/participant/ParticipantSummaryDataset.java +++ b/src/main/java/org/kpmp/participant/ParticipantSummaryDataset.java @@ -2,10 +2,10 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; @Entity @Table(name = "participant") diff --git a/src/main/java/org/kpmp/participant/ParticipantSummaryDatasetRepository.java b/src/main/java/org/kpmp/participant/ParticipantSummaryDatasetRepository.java index 6862bf6..fab74f2 100755 --- a/src/main/java/org/kpmp/participant/ParticipantSummaryDatasetRepository.java +++ b/src/main/java/org/kpmp/participant/ParticipantSummaryDatasetRepository.java @@ -10,7 +10,8 @@ public interface ParticipantSummaryDatasetRepository extends CrudRepository { @Cacheable("participantByRedcap") - ParticipantSummaryDataset findByRedcapId(@Param("redcap_id") String redcapId); + @Query(value = "select * from participant where redcap_id= :redcapId", nativeQuery = true) + ParticipantSummaryDataset findByRedcapId(@Param("redcapId") String redcapId); @Cacheable("partipantByTissueType") @Query(value = "select count(*) from participant where tissue_type= :tissue_type", nativeQuery = true) diff --git a/src/main/java/org/kpmp/participant/SingleCellMetadata.java b/src/main/java/org/kpmp/participant/SingleCellMetadata.java index 6dc4c08..237c29c 100755 --- a/src/main/java/org/kpmp/participant/SingleCellMetadata.java +++ b/src/main/java/org/kpmp/participant/SingleCellMetadata.java @@ -2,10 +2,10 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; @Entity @Table(name = "sc_metadata") diff --git a/src/main/java/org/kpmp/participant/SingleNucleusMetadata.java b/src/main/java/org/kpmp/participant/SingleNucleusMetadata.java index 417e59c..4b151c6 100755 --- a/src/main/java/org/kpmp/participant/SingleNucleusMetadata.java +++ b/src/main/java/org/kpmp/participant/SingleNucleusMetadata.java @@ -2,10 +2,10 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; @Entity @Table(name = "sn_metadata") diff --git a/src/main/java/org/kpmp/participant/SpatialViewerDataType.java b/src/main/java/org/kpmp/participant/SpatialViewerDataType.java index 44f2985..9e3ce85 100755 --- a/src/main/java/org/kpmp/participant/SpatialViewerDataType.java +++ b/src/main/java/org/kpmp/participant/SpatialViewerDataType.java @@ -2,10 +2,10 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; @Entity @Table(name = "sv_data_type_v") diff --git a/src/main/java/org/kpmp/umap/SCMetadata.java b/src/main/java/org/kpmp/umap/SCMetadata.java index dff6125..63f6cfb 100755 --- a/src/main/java/org/kpmp/umap/SCMetadata.java +++ b/src/main/java/org/kpmp/umap/SCMetadata.java @@ -2,11 +2,11 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.Transient; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; @Entity @Table(name = "sc_umap_point_v") diff --git a/src/main/java/org/kpmp/umap/SNMetadata.java b/src/main/java/org/kpmp/umap/SNMetadata.java index 7e2a5d4..3eabf27 100755 --- a/src/main/java/org/kpmp/umap/SNMetadata.java +++ b/src/main/java/org/kpmp/umap/SNMetadata.java @@ -2,11 +2,11 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.Transient; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; @Entity @Table(name = "sn_umap_point_v") diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f6d43aa..d995322 100755 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,14 +2,14 @@ spring.datasource.url=jdbc:mysql://${MYSQL_HOST}:3306/knowledge_environment spring.datasource.username=${MYSQL_USER} spring.datasource.password=${MYSQL_PASSWORD} spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect +spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect spring.main.allow-bean-definition-overriding=true graphql.servlet.exception-handlers-enabled=true spring.jpa.show_sql=false -spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect +spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect server.port=3030 spring.jpa.properties.hibernate.jdbc.time_zone=America/Detroit - +spring.graphql.graphiql.enabled=true experiment.label.clinicalStudyData=Clinical Study Data experiment.label.biomarkers=Biomarkers diff --git a/src/main/resources/knowledge_environment.graphqls b/src/main/resources/graphql/knowledge_environment.graphqls similarity index 90% rename from src/main/resources/knowledge_environment.graphqls rename to src/main/resources/graphql/knowledge_environment.graphqls index 5287985..4bd6d24 100755 --- a/src/main/resources/knowledge_environment.graphqls +++ b/src/main/resources/graphql/knowledge_environment.graphqls @@ -36,11 +36,11 @@ type AtlasRepoSummaryResult { } type AtlasRepoSummaryRow { - akiCount: Long - ckdCount: Long - hrtCount: Long - dmrCount: Long - totalCount: Long + akiCount: Int + ckdCount: Int + hrtCount: Int + dmrCount: Int + totalCount: Int omicsType: String linkInformation: AtlasRepositoryLinkInformation } @@ -51,10 +51,10 @@ type AtlasRepositoryLinkInformation { } type ParticipantTissueTypeSummary { - akiCount: Long - ckdCount: Long - hrtCount: Long - dmrCount: Long + akiCount: Int + ckdCount: Int + hrtCount: Int + dmrCount: Int } type ParticipantDataTypeSummary { @@ -64,7 +64,7 @@ type ParticipantDataTypeSummary { type ParticipantDataTypeInformation { dataType: String - count: Long + count: Int isAggregatedData: Boolean } @@ -74,7 +74,7 @@ type ParticipantRepoDataTypeSummary { type ParticipantRepoDataTypeInformation { dataType: String - count: Long + count: Int linkInformation: AtlasRepositoryLinkInformation } @@ -82,12 +82,12 @@ type DataTypeSummaryInformation { omicsType: String dataType: String dataTypeShort: String - akiCount: Long - ckdCount: Long - hrtCount: Long - dmrCount: Long - totalCount: Long - participantCount: Long + akiCount: Int + ckdCount: Int + hrtCount: Int + dmrCount: Int + totalCount: Int + participantCount: Int } diff --git a/src/test/java/org/kpmp/DataTypeEnumTest.java b/src/test/java/org/kpmp/DataTypeEnumTest.java index 9b87d33..57bbe80 100755 --- a/src/test/java/org/kpmp/DataTypeEnumTest.java +++ b/src/test/java/org/kpmp/DataTypeEnumTest.java @@ -1,8 +1,8 @@ package org.kpmp; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class DataTypeEnumTest { diff --git a/src/test/java/org/kpmp/FullDataTypeEnumTest.java b/src/test/java/org/kpmp/FullDataTypeEnumTest.java index f27f455..28af352 100755 --- a/src/test/java/org/kpmp/FullDataTypeEnumTest.java +++ b/src/test/java/org/kpmp/FullDataTypeEnumTest.java @@ -1,8 +1,8 @@ package org.kpmp; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class FullDataTypeEnumTest { diff --git a/src/test/java/org/kpmp/OmicsTypeEnumTest.java b/src/test/java/org/kpmp/OmicsTypeEnumTest.java index b4e6e94..15ae3ac 100755 --- a/src/test/java/org/kpmp/OmicsTypeEnumTest.java +++ b/src/test/java/org/kpmp/OmicsTypeEnumTest.java @@ -1,8 +1,8 @@ package org.kpmp; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class OmicsTypeEnumTest { diff --git a/src/test/java/org/kpmp/QueryTest.java b/src/test/java/org/kpmp/QueryControllerTest.java similarity index 96% rename from src/test/java/org/kpmp/QueryTest.java rename to src/test/java/org/kpmp/QueryControllerTest.java index ea3afde..a8df14c 100755 --- a/src/test/java/org/kpmp/QueryTest.java +++ b/src/test/java/org/kpmp/QueryControllerTest.java @@ -1,7 +1,7 @@ package org.kpmp; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; @@ -15,9 +15,9 @@ import java.util.Date; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.atlasMessage.AtlasMessage; import org.kpmp.atlasMessage.AtlasMessageService; import org.kpmp.autocomplete.AutocompleteResult; @@ -50,7 +50,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; -public class QueryTest { +public class QueryControllerTest { @Mock private CellTypeService cellTypeService; @@ -60,7 +60,7 @@ public class QueryTest { private GeneExpressionSummaryService geneExpressionService; @Mock private DataSummaryService dataSummaryService; - private Query query; + private QueryController query; @Mock private UmapDataService umapDataService; @Mock @@ -77,15 +77,15 @@ public class QueryTest { @Mock private RPExpressionDataService rpExpressionDataService; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); - query = new Query(autocompleteService, cellTypeService, umapDataService, geneExpressionService, + query = new QueryController(autocompleteService, cellTypeService, umapDataService, geneExpressionService, dataSummaryService, clusterHierarchyService, rtExpressionDataService, rpExpressionDataService, participantService, atlasMessageService); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); query = null; @@ -124,7 +124,7 @@ public void testGetCellTypeHierarchy() throws Exception { CellTypeHierarchy expectedResult = new CellTypeHierarchy(); when(cellTypeService.getCellTypeHierarchy()).thenReturn(expectedResult); - assertEquals(expectedResult, query.getCellTypeHierarchy()); + assertEquals(expectedResult, query.cellTypeHierarchy()); } @SuppressWarnings({ "rawtypes", "unchecked" }) diff --git a/src/test/java/org/kpmp/RTComparisonTypeEnumTest.java b/src/test/java/org/kpmp/RTComparisonTypeEnumTest.java index f4cee0a..47cd2ab 100755 --- a/src/test/java/org/kpmp/RTComparisonTypeEnumTest.java +++ b/src/test/java/org/kpmp/RTComparisonTypeEnumTest.java @@ -1,8 +1,8 @@ package org.kpmp; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; public class RTComparisonTypeEnumTest { diff --git a/src/test/java/org/kpmp/TissueTypeEnumTest.java b/src/test/java/org/kpmp/TissueTypeEnumTest.java index 680d310..3cb79c9 100755 --- a/src/test/java/org/kpmp/TissueTypeEnumTest.java +++ b/src/test/java/org/kpmp/TissueTypeEnumTest.java @@ -1,8 +1,8 @@ package org.kpmp; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class TissueTypeEnumTest { diff --git a/src/test/java/org/kpmp/atlasMessage/AtlasMessageServiceTest.java b/src/test/java/org/kpmp/atlasMessage/AtlasMessageServiceTest.java index ae21f72..097f996 100644 --- a/src/test/java/org/kpmp/atlasMessage/AtlasMessageServiceTest.java +++ b/src/test/java/org/kpmp/atlasMessage/AtlasMessageServiceTest.java @@ -1,6 +1,6 @@ package org.kpmp.atlasMessage; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.when; import java.text.SimpleDateFormat; diff --git a/src/test/java/org/kpmp/cellType/CellTypeHierarchyTest.java b/src/test/java/org/kpmp/cellType/CellTypeHierarchyTest.java index f0570a3..ac85344 100755 --- a/src/test/java/org/kpmp/cellType/CellTypeHierarchyTest.java +++ b/src/test/java/org/kpmp/cellType/CellTypeHierarchyTest.java @@ -1,24 +1,24 @@ package org.kpmp.cellType; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class CellTypeHierarchyTest { private CellTypeHierarchy hierarchy; - @Before + @BeforeEach public void setUp() throws Exception { hierarchy = new CellTypeHierarchy(); } - @After + @AfterEach public void tearDown() throws Exception { hierarchy = null; } diff --git a/src/test/java/org/kpmp/cellType/CellTypeServiceTest.java b/src/test/java/org/kpmp/cellType/CellTypeServiceTest.java index 47bf377..3190a94 100755 --- a/src/test/java/org/kpmp/cellType/CellTypeServiceTest.java +++ b/src/test/java/org/kpmp/cellType/CellTypeServiceTest.java @@ -1,13 +1,13 @@ package org.kpmp.cellType; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.when; import java.util.ArrayList; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @@ -17,14 +17,14 @@ public class CellTypeServiceTest { private CellTypeRepository cellTypeRepo; private CellTypeService service; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); service = new CellTypeService(cellTypeRepo); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); service = null; diff --git a/src/test/java/org/kpmp/cellType/CellTypeStructureRegionTest.java b/src/test/java/org/kpmp/cellType/CellTypeStructureRegionTest.java index 76b0361..861af28 100755 --- a/src/test/java/org/kpmp/cellType/CellTypeStructureRegionTest.java +++ b/src/test/java/org/kpmp/cellType/CellTypeStructureRegionTest.java @@ -1,25 +1,25 @@ package org.kpmp.cellType; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class CellTypeStructureRegionTest { private CellTypeStructureRegion region; - @Before + @BeforeEach public void setUp() throws Exception { region = new CellTypeStructureRegion("region1"); } - @After + @AfterEach public void tearDown() throws Exception { region = null; } diff --git a/src/test/java/org/kpmp/cellType/CellTypeStructureSubregionTest.java b/src/test/java/org/kpmp/cellType/CellTypeStructureSubregionTest.java index bea2616..482e372 100755 --- a/src/test/java/org/kpmp/cellType/CellTypeStructureSubregionTest.java +++ b/src/test/java/org/kpmp/cellType/CellTypeStructureSubregionTest.java @@ -1,18 +1,18 @@ package org.kpmp.cellType; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class CellTypeStructureSubregionTest { - @Before + @BeforeEach public void setUp() throws Exception { } - @After + @AfterEach public void tearDown() throws Exception { } diff --git a/src/test/java/org/kpmp/cellType/CellTypeTest.java b/src/test/java/org/kpmp/cellType/CellTypeTest.java index 73b69ac..218e5a9 100755 --- a/src/test/java/org/kpmp/cellType/CellTypeTest.java +++ b/src/test/java/org/kpmp/cellType/CellTypeTest.java @@ -8,20 +8,20 @@ import java.util.List; import java.util.Set; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class CellTypeTest { private CellType cellType; - @Before + @BeforeEach public void setUp() { cellType = new CellType(); } - @After + @AfterEach public void tearDown() { cellType = null; } diff --git a/src/test/java/org/kpmp/cellTypeSummary/ClusterHierarchyIdTest.java b/src/test/java/org/kpmp/cellTypeSummary/ClusterHierarchyIdTest.java index 298ee3f..49891fe 100755 --- a/src/test/java/org/kpmp/cellTypeSummary/ClusterHierarchyIdTest.java +++ b/src/test/java/org/kpmp/cellTypeSummary/ClusterHierarchyIdTest.java @@ -2,20 +2,20 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class ClusterHierarchyIdTest { private ClusterHierarchyId id; - @Before + @BeforeEach public void setUp() throws Exception { id = new ClusterHierarchyId(); } - @After + @AfterEach public void tearDown() throws Exception { id = null; } diff --git a/src/test/java/org/kpmp/cellTypeSummary/ClusterHierarchyServiceTest.java b/src/test/java/org/kpmp/cellTypeSummary/ClusterHierarchyServiceTest.java index a46778c..18f5957 100755 --- a/src/test/java/org/kpmp/cellTypeSummary/ClusterHierarchyServiceTest.java +++ b/src/test/java/org/kpmp/cellTypeSummary/ClusterHierarchyServiceTest.java @@ -8,9 +8,9 @@ import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.DataTypeEnum; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @@ -21,13 +21,13 @@ public class ClusterHierarchyServiceTest { private ClusterHiearchyRepository clusterHierarchyRepo; private ClusterHierarchyService service; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); service = new ClusterHierarchyService(clusterHierarchyRepo); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); service = null; diff --git a/src/test/java/org/kpmp/cellTypeSummary/ClusterHierarchyTest.java b/src/test/java/org/kpmp/cellTypeSummary/ClusterHierarchyTest.java index 18b33b6..cde5bf9 100755 --- a/src/test/java/org/kpmp/cellTypeSummary/ClusterHierarchyTest.java +++ b/src/test/java/org/kpmp/cellTypeSummary/ClusterHierarchyTest.java @@ -1,21 +1,21 @@ package org.kpmp.cellTypeSummary; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class ClusterHierarchyTest { private ClusterHierarchy clusterHierarchy; - @Before + @BeforeEach public void setUp() throws Exception { clusterHierarchy = new ClusterHierarchy(); } - @After + @AfterEach public void tearDown() throws Exception { clusterHierarchy = null; } diff --git a/src/test/java/org/kpmp/cluster/ClusterServiceTest.java b/src/test/java/org/kpmp/cluster/ClusterServiceTest.java index 5e23bec..7f2470a 100755 --- a/src/test/java/org/kpmp/cluster/ClusterServiceTest.java +++ b/src/test/java/org/kpmp/cluster/ClusterServiceTest.java @@ -1,14 +1,14 @@ package org.kpmp.cluster; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.when; import java.util.Arrays; import java.util.Map; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @@ -18,13 +18,13 @@ public class ClusterServiceTest { private ClusterRepository clusterRepo; private ClusterService service; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); service = new ClusterService(clusterRepo); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); service = null; diff --git a/src/test/java/org/kpmp/cluster/ClusterTest.java b/src/test/java/org/kpmp/cluster/ClusterTest.java index ad1920d..c924352 100755 --- a/src/test/java/org/kpmp/cluster/ClusterTest.java +++ b/src/test/java/org/kpmp/cluster/ClusterTest.java @@ -1,21 +1,21 @@ package org.kpmp.cluster; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class ClusterTest { private Cluster cluster; - @Before + @BeforeEach public void setUp() throws Exception { cluster = new Cluster(); } - @After + @AfterEach public void tearDown() throws Exception { cluster = null; } diff --git a/src/test/java/org/kpmp/dataSummary/AtlasRepoSummaryResultTest.java b/src/test/java/org/kpmp/dataSummary/AtlasRepoSummaryResultTest.java index 51a7d66..02095a4 100644 --- a/src/test/java/org/kpmp/dataSummary/AtlasRepoSummaryResultTest.java +++ b/src/test/java/org/kpmp/dataSummary/AtlasRepoSummaryResultTest.java @@ -1,12 +1,12 @@ package org.kpmp.dataSummary; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; public class AtlasRepoSummaryResultTest { @@ -15,12 +15,12 @@ public class AtlasRepoSummaryResultTest { @Mock private List summaryRows; - @Before + @BeforeEach public void setUp() throws Exception { result = new AtlasRepoSummaryResult(); } - @After + @AfterEach public void tearDown() throws Exception { result = null; } diff --git a/src/test/java/org/kpmp/dataSummary/AtlasRepoSummaryRowTest.java b/src/test/java/org/kpmp/dataSummary/AtlasRepoSummaryRowTest.java index 74e5450..5ce58e3 100644 --- a/src/test/java/org/kpmp/dataSummary/AtlasRepoSummaryRowTest.java +++ b/src/test/java/org/kpmp/dataSummary/AtlasRepoSummaryRowTest.java @@ -1,11 +1,11 @@ package org.kpmp.dataSummary; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.mock; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @@ -15,13 +15,13 @@ public class AtlasRepoSummaryRowTest { AtlasRepositoryLinkInformation linkInformation; private AtlasRepoSummaryRow row; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); row = new AtlasRepoSummaryRow("omicsType", linkInformation); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); row = null; diff --git a/src/test/java/org/kpmp/dataSummary/AtlasRepositoryLinkInformationTest.java b/src/test/java/org/kpmp/dataSummary/AtlasRepositoryLinkInformationTest.java index 7ec48e7..f9339d1 100644 --- a/src/test/java/org/kpmp/dataSummary/AtlasRepositoryLinkInformationTest.java +++ b/src/test/java/org/kpmp/dataSummary/AtlasRepositoryLinkInformationTest.java @@ -2,18 +2,18 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class AtlasRepositoryLinkInformationTest { - @Before + @BeforeEach public void setUp() throws Exception { } - @After + @AfterEach public void tearDown() throws Exception { } diff --git a/src/test/java/org/kpmp/dataSummary/DataSummaryServiceTest.java b/src/test/java/org/kpmp/dataSummary/DataSummaryServiceTest.java index d80b38a..49361af 100755 --- a/src/test/java/org/kpmp/dataSummary/DataSummaryServiceTest.java +++ b/src/test/java/org/kpmp/dataSummary/DataSummaryServiceTest.java @@ -1,15 +1,15 @@ package org.kpmp.dataSummary; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.when; import java.util.Arrays; import java.util.List; import java.util.ArrayList; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.DataTypeEnum; import org.kpmp.FullDataTypeEnum; import org.kpmp.TissueTypeEnum; @@ -27,7 +27,7 @@ public class DataSummaryServiceTest { @Mock private ARFileInfoService fileInfoService; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); dataSummaryService = new DataSummaryService(dataSummaryRepository, atlasRepoSummaryRepository, fileInfoService); @@ -36,7 +36,7 @@ public void setUp() throws Exception { ReflectionTestUtils.setField(dataSummaryService, "BIOMARKER", "Biomarker"); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); dataSummaryService = null; diff --git a/src/test/java/org/kpmp/dataSummary/DataTypeSummaryTest.java b/src/test/java/org/kpmp/dataSummary/DataTypeSummaryTest.java index 33d73c4..0e8823e 100755 --- a/src/test/java/org/kpmp/dataSummary/DataTypeSummaryTest.java +++ b/src/test/java/org/kpmp/dataSummary/DataTypeSummaryTest.java @@ -1,10 +1,10 @@ package org.kpmp.dataSummary; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.DataTypeEnum; import org.kpmp.FullDataTypeEnum; import org.kpmp.OmicsTypeEnum; @@ -13,7 +13,7 @@ public class DataTypeSummaryTest { private DataTypeSummary datasetSummary; - @Before + @BeforeEach public void setUp() { datasetSummary = new DataTypeSummary(OmicsTypeEnum.TRANSCRIPTOMICS.getEnum(), @@ -21,7 +21,7 @@ public void setUp() { Long.valueOf(2), Long.valueOf(4), Long.valueOf(6), Long.valueOf(7), Long.valueOf(8)); } - @After + @AfterEach public void tearDown() { datasetSummary = null; } diff --git a/src/test/java/org/kpmp/dataSummary/ExperimentalStrategyIdTest.java b/src/test/java/org/kpmp/dataSummary/ExperimentalStrategyIdTest.java index d9d80ac..51e5242 100644 --- a/src/test/java/org/kpmp/dataSummary/ExperimentalStrategyIdTest.java +++ b/src/test/java/org/kpmp/dataSummary/ExperimentalStrategyIdTest.java @@ -2,20 +2,20 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class ExperimentalStrategyIdTest { private ExperimentalStrategyId id; - @Before + @BeforeEach public void setUp() throws Exception { id = new ExperimentalStrategyId(); } - @After + @AfterEach public void tearDown() throws Exception { id = null; } diff --git a/src/test/java/org/kpmp/dataSummary/ExperimentalStrategyValueTest.java b/src/test/java/org/kpmp/dataSummary/ExperimentalStrategyValueTest.java index b2b3346..a4b6f1b 100644 --- a/src/test/java/org/kpmp/dataSummary/ExperimentalStrategyValueTest.java +++ b/src/test/java/org/kpmp/dataSummary/ExperimentalStrategyValueTest.java @@ -2,20 +2,20 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class ExperimentalStrategyValueTest { private ExperimentalStrategyValue value; - @Before + @BeforeEach public void setUp() throws Exception { value = new ExperimentalStrategyValue(); } - @After + @AfterEach public void tearDown() throws Exception { value = null; } diff --git a/src/test/java/org/kpmp/errors/ErrorControllerTest.java b/src/test/java/org/kpmp/errors/ErrorControllerTest.java index 8297df7..77f4d8a 100755 --- a/src/test/java/org/kpmp/errors/ErrorControllerTest.java +++ b/src/test/java/org/kpmp/errors/ErrorControllerTest.java @@ -3,11 +3,11 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.logging.LoggingService; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @@ -18,13 +18,13 @@ public class ErrorControllerTest { private LoggingService logger; private ErrorController controller; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); controller = new ErrorController(logger); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); } diff --git a/src/test/java/org/kpmp/errors/FrontEndErrorTest.java b/src/test/java/org/kpmp/errors/FrontEndErrorTest.java index 84b618c..6bf86fc 100755 --- a/src/test/java/org/kpmp/errors/FrontEndErrorTest.java +++ b/src/test/java/org/kpmp/errors/FrontEndErrorTest.java @@ -1,21 +1,21 @@ package org.kpmp.errors; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class FrontEndErrorTest { private FrontEndError error; - @Before + @BeforeEach public void setup() { error = new FrontEndError(); } - @After + @AfterEach public void tearDown() { error = null; } diff --git a/src/test/java/org/kpmp/file/ARFileInfoServiceTest.java b/src/test/java/org/kpmp/file/ARFileInfoServiceTest.java index 81d1470..22c9848 100644 --- a/src/test/java/org/kpmp/file/ARFileInfoServiceTest.java +++ b/src/test/java/org/kpmp/file/ARFileInfoServiceTest.java @@ -1,6 +1,6 @@ package org.kpmp.file; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.when; import org.junit.jupiter.api.AfterEach; diff --git a/src/test/java/org/kpmp/file/ARFileInfoTest.java b/src/test/java/org/kpmp/file/ARFileInfoTest.java index 10eac04..297e872 100644 --- a/src/test/java/org/kpmp/file/ARFileInfoTest.java +++ b/src/test/java/org/kpmp/file/ARFileInfoTest.java @@ -1,6 +1,6 @@ package org.kpmp.file; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/src/test/java/org/kpmp/gene/GeneServiceTest.java b/src/test/java/org/kpmp/gene/GeneServiceTest.java index a160b02..9b7a122 100755 --- a/src/test/java/org/kpmp/gene/GeneServiceTest.java +++ b/src/test/java/org/kpmp/gene/GeneServiceTest.java @@ -1,6 +1,6 @@ package org.kpmp.gene; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doReturn; @@ -14,9 +14,9 @@ import java.util.List; import org.apache.commons.io.IOUtils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; @@ -28,13 +28,13 @@ public class GeneServiceTest { @Mock HttpURLConnection connection; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); geneService = new GeneService(); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); geneService = null; diff --git a/src/test/java/org/kpmp/gene/MyGeneInfoHitTest.java b/src/test/java/org/kpmp/gene/MyGeneInfoHitTest.java index ebe0244..08d1b7f 100755 --- a/src/test/java/org/kpmp/gene/MyGeneInfoHitTest.java +++ b/src/test/java/org/kpmp/gene/MyGeneInfoHitTest.java @@ -1,24 +1,24 @@ package org.kpmp.gene; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class MyGeneInfoHitTest { private MyGeneInfoHit myGeneInfoHit; - @Before + @BeforeEach public void setUp() throws Exception { myGeneInfoHit = new MyGeneInfoHit(); } - @After + @AfterEach public void tearDown() throws Exception { myGeneInfoHit = null; } diff --git a/src/test/java/org/kpmp/gene/MyGeneInfoResultTest.java b/src/test/java/org/kpmp/gene/MyGeneInfoResultTest.java index c9d8649..b692b64 100755 --- a/src/test/java/org/kpmp/gene/MyGeneInfoResultTest.java +++ b/src/test/java/org/kpmp/gene/MyGeneInfoResultTest.java @@ -1,10 +1,10 @@ package org.kpmp.gene; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.Arrays; import java.util.List; @@ -14,12 +14,12 @@ public class MyGeneInfoResultTest { private MyGeneInfoResult myGeneInfoResult; - @Before + @BeforeEach public void setUp() throws Exception { myGeneInfoResult = new MyGeneInfoResult(); } - @After + @AfterEach public void tearDown() throws Exception { myGeneInfoResult = null; } diff --git a/src/test/java/org/kpmp/geneExpression/ExpressionDataServiceTest.java b/src/test/java/org/kpmp/geneExpression/ExpressionDataServiceTest.java index 2030703..55ee0a0 100755 --- a/src/test/java/org/kpmp/geneExpression/ExpressionDataServiceTest.java +++ b/src/test/java/org/kpmp/geneExpression/ExpressionDataServiceTest.java @@ -1,15 +1,15 @@ package org.kpmp.geneExpression; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.fail; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import org.json.JSONException; import org.json.JSONObject; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @@ -21,13 +21,13 @@ public class ExpressionDataServiceTest { private SCExpressionDataRepository scRepo; private SNSCExpressionDataService service; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); service = new SNSCExpressionDataService(snRepo, scRepo); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); service = null; diff --git a/src/test/java/org/kpmp/geneExpression/RPAccessionGroupTest.java b/src/test/java/org/kpmp/geneExpression/RPAccessionGroupTest.java index 70015f9..317c87b 100755 --- a/src/test/java/org/kpmp/geneExpression/RPAccessionGroupTest.java +++ b/src/test/java/org/kpmp/geneExpression/RPAccessionGroupTest.java @@ -1,8 +1,8 @@ package org.kpmp.geneExpression; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -10,12 +10,12 @@ public class RPAccessionGroupTest { private RPAccessionGroup rpAccessionGroup; - @Before + @BeforeEach public void setUp() throws Exception { rpAccessionGroup = new RPAccessionGroup(); } - @After + @AfterEach public void tearDown() throws Exception { rpAccessionGroup = null; } diff --git a/src/test/java/org/kpmp/geneExpression/RPExpressionByTissueTypeTest.java b/src/test/java/org/kpmp/geneExpression/RPExpressionByTissueTypeTest.java index e83b25b..5f8d8a9 100644 --- a/src/test/java/org/kpmp/geneExpression/RPExpressionByTissueTypeTest.java +++ b/src/test/java/org/kpmp/geneExpression/RPExpressionByTissueTypeTest.java @@ -6,20 +6,20 @@ import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class RPExpressionByTissueTypeTest { private RPExpressionByTissueType rpExpression; - @Before + @BeforeEach public void setUp() throws Exception { rpExpression = new RPExpressionByTissueType(); } - @After + @AfterEach public void tearDown() throws Exception { rpExpression = null; } diff --git a/src/test/java/org/kpmp/geneExpression/RPExpressionDataServiceTest.java b/src/test/java/org/kpmp/geneExpression/RPExpressionDataServiceTest.java index dab2141..fbabdc2 100755 --- a/src/test/java/org/kpmp/geneExpression/RPExpressionDataServiceTest.java +++ b/src/test/java/org/kpmp/geneExpression/RPExpressionDataServiceTest.java @@ -2,9 +2,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.TissueTypeEnum; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @@ -22,13 +22,13 @@ public class RPExpressionDataServiceTest { RPExpressionDataService rpExpressionDataService; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); rpExpressionDataService = new RPExpressionDataService(rpExpressionDataRepository); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); rpExpressionDataService = null; diff --git a/src/test/java/org/kpmp/geneExpression/RPExpressionDataTest.java b/src/test/java/org/kpmp/geneExpression/RPExpressionDataTest.java index 062b41f..beaf4e7 100755 --- a/src/test/java/org/kpmp/geneExpression/RPExpressionDataTest.java +++ b/src/test/java/org/kpmp/geneExpression/RPExpressionDataTest.java @@ -1,8 +1,8 @@ package org.kpmp.geneExpression; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -10,12 +10,12 @@ public class RPExpressionDataTest { private RPExpressionData rpExpressionData; - @Before + @BeforeEach public void setUp() throws Exception { rpExpressionData = new RPExpressionData(); } - @After + @AfterEach public void tearDown() throws Exception { rpExpressionData = null; } diff --git a/src/test/java/org/kpmp/geneExpression/RTExpressionByTissueTypeTest.java b/src/test/java/org/kpmp/geneExpression/RTExpressionByTissueTypeTest.java index e4f7e33..2f4d7c3 100755 --- a/src/test/java/org/kpmp/geneExpression/RTExpressionByTissueTypeTest.java +++ b/src/test/java/org/kpmp/geneExpression/RTExpressionByTissueTypeTest.java @@ -5,20 +5,20 @@ import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class RTExpressionByTissueTypeTest { private RTExpressionByTissueType rtExpressionByTissueType; - @Before + @BeforeEach public void setUp() throws Exception { rtExpressionByTissueType = new RTExpressionByTissueType(); } - @After + @AfterEach public void tearDown() throws Exception { rtExpressionByTissueType = null; } diff --git a/src/test/java/org/kpmp/geneExpression/RTExpressionDataAllSegmentsTest.java b/src/test/java/org/kpmp/geneExpression/RTExpressionDataAllSegmentsTest.java index 94fbcc3..dfc474f 100755 --- a/src/test/java/org/kpmp/geneExpression/RTExpressionDataAllSegmentsTest.java +++ b/src/test/java/org/kpmp/geneExpression/RTExpressionDataAllSegmentsTest.java @@ -1,6 +1,6 @@ package org.kpmp.geneExpression; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/src/test/java/org/kpmp/geneExpression/RTExpressionDataGTITest.java b/src/test/java/org/kpmp/geneExpression/RTExpressionDataGTITest.java index fb89396..9fa71b4 100755 --- a/src/test/java/org/kpmp/geneExpression/RTExpressionDataGTITest.java +++ b/src/test/java/org/kpmp/geneExpression/RTExpressionDataGTITest.java @@ -2,7 +2,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.Assert; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -84,7 +83,7 @@ void setSegmentName() { @Test void setAdjPVal() { rtExpressionDataGTI.setAdjPVal(123.456); - Assert.assertEquals(123.456, rtExpressionDataGTI.getAdjPVal(), 0.001); + assertEquals(123.456, rtExpressionDataGTI.getAdjPVal(), 0.001); } diff --git a/src/test/java/org/kpmp/geneExpression/RTExpressionDataServiceTest.java b/src/test/java/org/kpmp/geneExpression/RTExpressionDataServiceTest.java index 6384d48..248992b 100755 --- a/src/test/java/org/kpmp/geneExpression/RTExpressionDataServiceTest.java +++ b/src/test/java/org/kpmp/geneExpression/RTExpressionDataServiceTest.java @@ -6,9 +6,9 @@ import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.TissueTypeEnum; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @@ -21,14 +21,14 @@ public class RTExpressionDataServiceTest { private RTExpressionDataGTIRepository rtExpressionDataGTIRepository; private RTExpressionDataService rtExpressionDataService; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); rtExpressionDataService = new RTExpressionDataService(rtExpressionDataAllSegmentsRepository, rtExpressionDataGTIRepository); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); rtExpressionDataService = null; diff --git a/src/test/java/org/kpmp/geneExpression/SCExpressionDataTest.java b/src/test/java/org/kpmp/geneExpression/SCExpressionDataTest.java index 0bdb4c0..c71f2a1 100755 --- a/src/test/java/org/kpmp/geneExpression/SCExpressionDataTest.java +++ b/src/test/java/org/kpmp/geneExpression/SCExpressionDataTest.java @@ -1,22 +1,22 @@ package org.kpmp.geneExpression; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import org.json.JSONObject; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class SCExpressionDataTest { private SCExpressionData data; - @Before + @BeforeEach public void setUp() throws Exception { data = new SCExpressionData(); } - @After + @AfterEach public void tearDown() throws Exception { data = null; } diff --git a/src/test/java/org/kpmp/geneExpression/SNExpressionDataTest.java b/src/test/java/org/kpmp/geneExpression/SNExpressionDataTest.java index 455a115..80afe5e 100755 --- a/src/test/java/org/kpmp/geneExpression/SNExpressionDataTest.java +++ b/src/test/java/org/kpmp/geneExpression/SNExpressionDataTest.java @@ -1,22 +1,22 @@ package org.kpmp.geneExpression; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import org.json.JSONObject; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class SNExpressionDataTest { private SNExpressionData data; - @Before + @BeforeEach public void setUp() throws Exception { data = new SNExpressionData(); } - @After + @AfterEach public void tearDown() throws Exception { data = null; } diff --git a/src/test/java/org/kpmp/geneExpressionSummary/GeneExpressionIdTest.java b/src/test/java/org/kpmp/geneExpressionSummary/GeneExpressionIdTest.java index 472a2e1..f0f5be7 100755 --- a/src/test/java/org/kpmp/geneExpressionSummary/GeneExpressionIdTest.java +++ b/src/test/java/org/kpmp/geneExpressionSummary/GeneExpressionIdTest.java @@ -1,21 +1,21 @@ package org.kpmp.geneExpressionSummary; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; public class GeneExpressionIdTest { private GeneExpressionId geneExpressionId; - @Before + @BeforeEach public void setUp() { geneExpressionId = new GeneExpressionId(); } - @After + @AfterEach public void tearDown() { geneExpressionId = null; } diff --git a/src/test/java/org/kpmp/geneExpressionSummary/GeneExpressionSummaryServiceTest.java b/src/test/java/org/kpmp/geneExpressionSummary/GeneExpressionSummaryServiceTest.java index e788e8f..bbf5a28 100755 --- a/src/test/java/org/kpmp/geneExpressionSummary/GeneExpressionSummaryServiceTest.java +++ b/src/test/java/org/kpmp/geneExpressionSummary/GeneExpressionSummaryServiceTest.java @@ -1,6 +1,6 @@ package org.kpmp.geneExpressionSummary; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -8,9 +8,9 @@ import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.DataTypeEnum; import org.kpmp.dataSummary.DataTypeSummary; import org.kpmp.geneExpression.RPExpressionDataRepository; @@ -48,7 +48,7 @@ public class GeneExpressionSummaryServiceTest { @Mock private RPParticipantRepository rpParticipantRepository; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); geneExpressionService = new GeneExpressionSummaryService( @@ -57,7 +57,7 @@ public void setUp() throws Exception { rtParticipantRepository, rtExpressionDataAllSegmentsRepository, rpExpressionDataRepository, rpParticipantRepository); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); geneExpressionService = null; diff --git a/src/test/java/org/kpmp/geneExpressionSummary/ParticipantIdTest.java b/src/test/java/org/kpmp/geneExpressionSummary/ParticipantIdTest.java index c7c2082..7b55f77 100755 --- a/src/test/java/org/kpmp/geneExpressionSummary/ParticipantIdTest.java +++ b/src/test/java/org/kpmp/geneExpressionSummary/ParticipantIdTest.java @@ -1,21 +1,21 @@ package org.kpmp.geneExpressionSummary; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; public class ParticipantIdTest { private ParticipantId participantId; - @Before + @BeforeEach public void setUp() { participantId = new ParticipantId(); } - @After + @AfterEach public void tearDown() { participantId = null; } diff --git a/src/test/java/org/kpmp/geneExpressionSummary/SCRNAGeneExpressionSummaryValueTest.java b/src/test/java/org/kpmp/geneExpressionSummary/SCRNAGeneExpressionSummaryValueTest.java index 40711e2..82d5e95 100755 --- a/src/test/java/org/kpmp/geneExpressionSummary/SCRNAGeneExpressionSummaryValueTest.java +++ b/src/test/java/org/kpmp/geneExpressionSummary/SCRNAGeneExpressionSummaryValueTest.java @@ -1,22 +1,22 @@ package org.kpmp.geneExpressionSummary; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.geneExpressionSummary.singleCell.SCRNAGeneExpressionExpressionSummaryValue; public class SCRNAGeneExpressionSummaryValueTest { private SCRNAGeneExpressionExpressionSummaryValue scrnaGeneExpressionValue; - @Before + @BeforeEach public void setUp() throws Exception { scrnaGeneExpressionValue = new SCRNAGeneExpressionExpressionSummaryValue(); } - @After + @AfterEach public void tearDown() throws Exception { scrnaGeneExpressionValue = null; } diff --git a/src/test/java/org/kpmp/geneExpressionSummary/SCRNAParticipantValueTest.java b/src/test/java/org/kpmp/geneExpressionSummary/SCRNAParticipantValueTest.java index 214ee2c..feebfc6 100755 --- a/src/test/java/org/kpmp/geneExpressionSummary/SCRNAParticipantValueTest.java +++ b/src/test/java/org/kpmp/geneExpressionSummary/SCRNAParticipantValueTest.java @@ -1,22 +1,22 @@ package org.kpmp.geneExpressionSummary; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.geneExpressionSummary.singleCell.SCRNAParticipantValue; public class SCRNAParticipantValueTest { SCRNAParticipantValue scrnaParticipantValue; - @Before + @BeforeEach public void setUp() throws Exception { scrnaParticipantValue = new SCRNAParticipantValue(); } - @After + @AfterEach public void tearDown() throws Exception { scrnaParticipantValue = null; } diff --git a/src/test/java/org/kpmp/geneExpressionSummary/SNRNAGeneExpressionSummaryValueTest.java b/src/test/java/org/kpmp/geneExpressionSummary/SNRNAGeneExpressionSummaryValueTest.java index 118e05c..2451fa7 100755 --- a/src/test/java/org/kpmp/geneExpressionSummary/SNRNAGeneExpressionSummaryValueTest.java +++ b/src/test/java/org/kpmp/geneExpressionSummary/SNRNAGeneExpressionSummaryValueTest.java @@ -1,22 +1,22 @@ package org.kpmp.geneExpressionSummary; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.geneExpressionSummary.singleNucleus.SNRNAGeneExpressionExpressionSummaryValue; public class SNRNAGeneExpressionSummaryValueTest { SNRNAGeneExpressionExpressionSummaryValue snrnaGeneExpressionValue; - @Before + @BeforeEach public void setUp() throws Exception { snrnaGeneExpressionValue = new SNRNAGeneExpressionExpressionSummaryValue(); } - @After + @AfterEach public void tearDown() throws Exception { snrnaGeneExpressionValue = null; } diff --git a/src/test/java/org/kpmp/geneExpressionSummary/SNRNAParticipantValueTest.java b/src/test/java/org/kpmp/geneExpressionSummary/SNRNAParticipantValueTest.java index 3dbed99..7371cb1 100755 --- a/src/test/java/org/kpmp/geneExpressionSummary/SNRNAParticipantValueTest.java +++ b/src/test/java/org/kpmp/geneExpressionSummary/SNRNAParticipantValueTest.java @@ -1,22 +1,22 @@ package org.kpmp.geneExpressionSummary; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.geneExpressionSummary.singleNucleus.SNRNAParticipantValue; public class SNRNAParticipantValueTest { SNRNAParticipantValue snrnaParticipantValue; - @Before + @BeforeEach public void setUp() throws Exception { snrnaParticipantValue = new SNRNAParticipantValue(); } - @After + @AfterEach public void tearDown() throws Exception { snrnaParticipantValue = null; } diff --git a/src/test/java/org/kpmp/participant/ParticipantDataTypeSummaryTest.java b/src/test/java/org/kpmp/participant/ParticipantDataTypeSummaryTest.java index 557cddb..203d007 100755 --- a/src/test/java/org/kpmp/participant/ParticipantDataTypeSummaryTest.java +++ b/src/test/java/org/kpmp/participant/ParticipantDataTypeSummaryTest.java @@ -1,25 +1,25 @@ package org.kpmp.participant; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.mock; import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class ParticipantDataTypeSummaryTest { private ParticipantDataTypeSummary summary; - @Before + @BeforeEach public void setUp() throws Exception { summary = new ParticipantDataTypeSummary(); } - @After + @AfterEach public void tearDown() throws Exception { summary = null; } diff --git a/src/test/java/org/kpmp/participant/ParticipantRepoDataTest.java b/src/test/java/org/kpmp/participant/ParticipantRepoDataTest.java index 4cb1c08..6d4dcf0 100644 --- a/src/test/java/org/kpmp/participant/ParticipantRepoDataTest.java +++ b/src/test/java/org/kpmp/participant/ParticipantRepoDataTest.java @@ -1,21 +1,20 @@ package org.kpmp.participant; -import static org.junit.Assert.assertEquals; -import static org.mockito.Mockito.mock; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class ParticipantRepoDataTest { private ParticipantRepoData participantRepoData; - @Before + @BeforeEach public void setUp() throws Exception { participantRepoData = new ParticipantRepoData(); } - @After + @AfterEach public void tearDown() throws Exception { participantRepoData = null; } diff --git a/src/test/java/org/kpmp/participant/ParticipantRepoDataTypeInformationTest.java b/src/test/java/org/kpmp/participant/ParticipantRepoDataTypeInformationTest.java index cc769a8..9e435ba 100644 --- a/src/test/java/org/kpmp/participant/ParticipantRepoDataTypeInformationTest.java +++ b/src/test/java/org/kpmp/participant/ParticipantRepoDataTypeInformationTest.java @@ -1,23 +1,23 @@ package org.kpmp.participant; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.mock; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.dataSummary.AtlasRepositoryLinkInformation; public class ParticipantRepoDataTypeInformationTest { private ParticipantRepoDataTypeInformation info; - @Before + @BeforeEach public void setUp() throws Exception { info = new ParticipantRepoDataTypeInformation("abc", 1, mock(AtlasRepositoryLinkInformation.class)); } - @After + @AfterEach public void tearDown() throws Exception { info = null; } diff --git a/src/test/java/org/kpmp/participant/ParticipantRepoDataTypeSummaryTest.java b/src/test/java/org/kpmp/participant/ParticipantRepoDataTypeSummaryTest.java index 0892198..0bdab78 100644 --- a/src/test/java/org/kpmp/participant/ParticipantRepoDataTypeSummaryTest.java +++ b/src/test/java/org/kpmp/participant/ParticipantRepoDataTypeSummaryTest.java @@ -1,25 +1,25 @@ package org.kpmp.participant; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.mock; import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class ParticipantRepoDataTypeSummaryTest { private ParticipantRepoDataTypeSummary summary; - @Before + @BeforeEach public void setUp() throws Exception { summary = new ParticipantRepoDataTypeSummary(); } - @After + @AfterEach public void tearDown() throws Exception { summary = null; } diff --git a/src/test/java/org/kpmp/participant/ParticipantServiceTest.java b/src/test/java/org/kpmp/participant/ParticipantServiceTest.java index f7cb616..52b2e98 100755 --- a/src/test/java/org/kpmp/participant/ParticipantServiceTest.java +++ b/src/test/java/org/kpmp/participant/ParticipantServiceTest.java @@ -1,16 +1,16 @@ package org.kpmp.participant; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.util.Arrays; import java.util.List; import org.kpmp.TissueTypeEnum; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.dataSummary.DataSummaryRepository; import org.kpmp.geneExpressionSummary.regionalProteomics.RPParticipantRepository; import org.kpmp.geneExpressionSummary.regionalTranscriptomics.RTParticipantRepository; @@ -39,14 +39,14 @@ public class ParticipantServiceTest { @Mock private RPParticipantRepository rpParticipantRepository; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); participantService = new ParticipantService(dataSummaryRepo, svTypeRepo, scMetadataRepo, snMetadataRepo, rtParticipantRepo, participantSummaryDatasetRepository, rpParticipantRepository,fileByParticipantRepo); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); participantService = null; diff --git a/src/test/java/org/kpmp/participant/ParticipantTissueTypeSummaryTest.java b/src/test/java/org/kpmp/participant/ParticipantTissueTypeSummaryTest.java index 61d5965..3810fad 100644 --- a/src/test/java/org/kpmp/participant/ParticipantTissueTypeSummaryTest.java +++ b/src/test/java/org/kpmp/participant/ParticipantTissueTypeSummaryTest.java @@ -1,19 +1,19 @@ package org.kpmp.participant; -import static org.junit.Assert.assertEquals; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class ParticipantTissueTypeSummaryTest { private ParticipantTissueTypeSummary tissueSummary; - @Before + @BeforeEach public void setUp() { tissueSummary = new ParticipantTissueTypeSummary(Long.valueOf(4), Long.valueOf(5), Long.valueOf(6), Long.valueOf(7)); } - @After + @AfterEach public void tearDown() { tissueSummary = null; } diff --git a/src/test/java/org/kpmp/participant/SingleCellMetadataTest.java b/src/test/java/org/kpmp/participant/SingleCellMetadataTest.java index dbea114..715d8f4 100755 --- a/src/test/java/org/kpmp/participant/SingleCellMetadataTest.java +++ b/src/test/java/org/kpmp/participant/SingleCellMetadataTest.java @@ -1,21 +1,21 @@ package org.kpmp.participant; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class SingleCellMetadataTest { private SingleCellMetadata scMetadata; - @Before + @BeforeEach public void setUp() throws Exception { scMetadata = new SingleCellMetadata(); } - @After + @AfterEach public void tearDown() throws Exception { scMetadata = null; } diff --git a/src/test/java/org/kpmp/participant/SingleNucleusMetadataTest.java b/src/test/java/org/kpmp/participant/SingleNucleusMetadataTest.java index 2c62101..9b3420a 100755 --- a/src/test/java/org/kpmp/participant/SingleNucleusMetadataTest.java +++ b/src/test/java/org/kpmp/participant/SingleNucleusMetadataTest.java @@ -1,21 +1,21 @@ package org.kpmp.participant; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class SingleNucleusMetadataTest { private SingleNucleusMetadata snMetadata; - @Before + @BeforeEach public void setUp() throws Exception { snMetadata = new SingleNucleusMetadata(); } - @After + @AfterEach public void tearDown() throws Exception { snMetadata = null; } diff --git a/src/test/java/org/kpmp/participant/SpatialViewerDataTypeTest.java b/src/test/java/org/kpmp/participant/SpatialViewerDataTypeTest.java index d42162d..551190d 100755 --- a/src/test/java/org/kpmp/participant/SpatialViewerDataTypeTest.java +++ b/src/test/java/org/kpmp/participant/SpatialViewerDataTypeTest.java @@ -1,21 +1,21 @@ package org.kpmp.participant; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class SpatialViewerDataTypeTest { private SpatialViewerDataType type; - @Before + @BeforeEach public void setUp() throws Exception { type = new SpatialViewerDataType(); } - @After + @AfterEach public void tearDown() throws Exception { type = null; } diff --git a/src/test/java/org/kpmp/umap/FeatureDataTest.java b/src/test/java/org/kpmp/umap/FeatureDataTest.java index cbae157..3989d41 100755 --- a/src/test/java/org/kpmp/umap/FeatureDataTest.java +++ b/src/test/java/org/kpmp/umap/FeatureDataTest.java @@ -1,25 +1,25 @@ package org.kpmp.umap; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class FeatureDataTest { private FeatureData featureData; private static double DOUBLE_PRECISION = 0.000001d; - @Before + @BeforeEach public void setUp() throws Exception { featureData = new FeatureData(); } - @After + @AfterEach public void tearDown() throws Exception { featureData = null; } diff --git a/src/test/java/org/kpmp/umap/PlotDataTest.java b/src/test/java/org/kpmp/umap/PlotDataTest.java index 559813b..b716e9a 100755 --- a/src/test/java/org/kpmp/umap/PlotDataTest.java +++ b/src/test/java/org/kpmp/umap/PlotDataTest.java @@ -1,13 +1,13 @@ package org.kpmp.umap; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import java.util.ArrayList; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; public class PlotDataTest { @@ -18,12 +18,12 @@ public class PlotDataTest { private List referenceData; private PlotData plotData; - @Before + @BeforeEach public void setUp() throws Exception { plotData = new PlotData(referenceData, featureData); } - @After + @AfterEach public void tearDown() throws Exception { plotData = null; } diff --git a/src/test/java/org/kpmp/umap/ReferenceClusterTest.java b/src/test/java/org/kpmp/umap/ReferenceClusterTest.java index 721438d..0b49891 100755 --- a/src/test/java/org/kpmp/umap/ReferenceClusterTest.java +++ b/src/test/java/org/kpmp/umap/ReferenceClusterTest.java @@ -1,25 +1,25 @@ package org.kpmp.umap; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class ReferenceClusterTest { private ReferenceCluster cluster; private static double DOUBLE_PRECISION = 0.000001d; - @Before + @BeforeEach public void setUp() throws Exception { cluster = new ReferenceCluster("clusterAbbrev", "color"); } - @After + @AfterEach public void tearDown() throws Exception { cluster = null; } diff --git a/src/test/java/org/kpmp/umap/SCMetadataTest.java b/src/test/java/org/kpmp/umap/SCMetadataTest.java index b4983b8..e58c686 100755 --- a/src/test/java/org/kpmp/umap/SCMetadataTest.java +++ b/src/test/java/org/kpmp/umap/SCMetadataTest.java @@ -2,21 +2,21 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class SCMetadataTest { private static double DOUBLE_PRECISION = 0.000001d; private SCMetadata point; - @Before + @BeforeEach public void setUp() throws Exception { point = new SCMetadata(); } - @After + @AfterEach public void tearDown() throws Exception { point = null; } diff --git a/src/test/java/org/kpmp/umap/SNMetadataTest.java b/src/test/java/org/kpmp/umap/SNMetadataTest.java index b8b8505..85e49b7 100755 --- a/src/test/java/org/kpmp/umap/SNMetadataTest.java +++ b/src/test/java/org/kpmp/umap/SNMetadataTest.java @@ -2,21 +2,21 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class SNMetadataTest { private static double DOUBLE_PRECISION = 0.000001d; private SNMetadata point; - @Before + @BeforeEach public void setUp() throws Exception { point = new SNMetadata(); } - @After + @AfterEach public void tearDown() throws Exception { point = null; } diff --git a/src/test/java/org/kpmp/umap/UmapDataServiceTest.java b/src/test/java/org/kpmp/umap/UmapDataServiceTest.java index 920ed34..74c89ad 100755 --- a/src/test/java/org/kpmp/umap/UmapDataServiceTest.java +++ b/src/test/java/org/kpmp/umap/UmapDataServiceTest.java @@ -1,15 +1,15 @@ package org.kpmp.umap; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.when; import java.util.Arrays; import java.util.List; import org.json.JSONObject; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.kpmp.geneExpression.SNSCExpressionDataService; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @@ -26,13 +26,13 @@ public class UmapDataServiceTest { private static double DOUBLE_PRECISION = 0.000001d; - @Before + @BeforeEach public void setUp() throws Exception { MockitoAnnotations.openMocks(this); service = new UmapDataService(scMetadataRepository, snMetadataRepository, expressionDataService); } - @After + @AfterEach public void tearDown() throws Exception { MockitoAnnotations.openMocks(this).close(); service = null;