Skip to content

Commit

Permalink
test: fix JUnit tests by updating configuration files, #TASK-5564
Browse files Browse the repository at this point in the history
  • Loading branch information
jtarraga committed Aug 13, 2024
1 parent 162f34d commit 344e92e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static String cleanAssembly(String assembly) {
throw new InvalidParameterException("Assembly is empty");
}

return assembly.replace("\\.", "")
return assembly.replace(".", "")
.replace("-", "")
.replace("_", "").toLowerCase(Locale.ROOT);
}
Expand Down
2 changes: 1 addition & 1 deletion cellbase-core/src/main/resources/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ species:
- variation
- variation_functional_score
- missense_variation_functional_score
- clinical_variant
- clinical_variants
- splice_score
- ontology
- pubmed
Expand Down
10 changes: 6 additions & 4 deletions cellbase-core/src/test/resources/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,15 @@ species:
- conservation
- repeats
- gene
- regulation
- protein
- clinical_variant
- missense_variation_functional_score
- ontology
- regulation
- variation
- variation_functional_score
- missense_variation_functional_score
- clinical_variants
- splice_score
- ontology
- pubmed
- pharmacogenomics
- id: mmusculus
scientificName: Mus musculus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void testGetDatabaseName() {
assertThrows(InvalidParameterException.class,
() -> DatabaseNameUtils.getDatabaseName("speciesName", null, cellBaseConfiguration.getVersion()),
"Expected getDatabaseName() to throw an exception, but it didn't");
assertTrue(thrown.getMessage().contains("Species and assembly are required"));
assertTrue(thrown.getMessage().contains("species and assembly are required"));

// handle special characters
databaseName = DatabaseNameUtils.getDatabaseName("speciesName", "my_funny.assembly--name", cellBaseConfiguration.getVersion());
Expand Down
10 changes: 6 additions & 4 deletions cellbase-lib/src/test/resources/configuration.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,15 @@ species:
- conservation
- repeats
- gene
- regulation
- protein
- clinical_variant
- missense_variation_functional_score
- ontology
- regulation
- variation
- variation_functional_score
- missense_variation_functional_score
- clinical_variants
- splice_score
- ontology
- pubmed
- pharmacogenomics
- id: mmusculus
scientificName: Mus musculus
Expand Down

0 comments on commit 344e92e

Please sign in to comment.