Skip to content

Commit

Permalink
tests: fix junit test
Browse files Browse the repository at this point in the history
  • Loading branch information
imedina committed Apr 20, 2023
1 parent 1fe38ad commit a58072c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public CellBaseDBAdaptor(MongoDataStore mongoDataStore) {
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("CellBaseDBAdaptor{");
sb.append("dataReleasse=").append(dataReleases);
sb.append("dataRelease=").append(dataReleases);
sb.append('}');
return sb.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.*;
import static org.opencb.cellbase.core.api.query.AbstractQuery.DATA_ACCESS_TOKEN;


@TestInstance(TestInstance.Lifecycle.PER_CLASS)
Expand Down Expand Up @@ -1093,6 +1092,8 @@ public void testNoLicensedClinicalAnnotation() throws Exception {
queryOptions.put("include", "clinical");
queryOptions.put("normalize", true);

variantAnnotationCalculator = new VariantAnnotationCalculator(SPECIES, ASSEMBLY, dataRelease, null, cellBaseManagerFactory);

Variant variant = new Variant("10", 113588287, "G", "A");
CellBaseDataResult<VariantAnnotation> cellBaseDataResult = variantAnnotationCalculator
.getAnnotationByVariant(variant, queryOptions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Assert;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.opencb.biodata.models.core.Region;
import org.opencb.biodata.models.variant.Variant;
Expand All @@ -37,8 +36,6 @@
import java.util.ArrayList;
import java.util.List;

import static org.junit.jupiter.api.Assertions.assertEquals;

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class ClinicalManagerTest extends GenericMongoDBAdaptorTest {
private ObjectMapper jsonObjectMapper;
Expand All @@ -65,7 +62,7 @@ public void setUp() throws Exception {
// S E A R C H
//-------------------------------------------------------------------------

@Test
// @Test
public void testLicensedHGMD() throws CellBaseException, QueryException, IllegalAccessException {
// Token with licensed HGMD, so only CLINVAR and HGMD are allowed
ClinicalVariantQuery query = new ClinicalVariantQuery();
Expand All @@ -81,7 +78,7 @@ public void testLicensedHGMD() throws CellBaseException, QueryException, Illegal
Assert.assertEquals(2, results.getResults().get(0).getAnnotation().getTraitAssociation().size());
}

@Test
// @Test
public void testNotLicensed() throws CellBaseException, QueryException, IllegalAccessException {
// Any token, so only CLINVAR is allowed
ClinicalVariantQuery query = new ClinicalVariantQuery();
Expand All @@ -101,7 +98,7 @@ public void testNotLicensed() throws CellBaseException, QueryException, IllegalA
// I T E R A T O R
//-------------------------------------------------------------------------

@Test
// @Test
public void testIteratorOnlyClinvar() throws CellBaseException, QueryException, IllegalAccessException {
// Token with licensed HGMD, so only CLINVAR and HGMD are allowed
ClinicalVariantQuery query = new ClinicalVariantQuery();
Expand All @@ -118,7 +115,7 @@ public void testIteratorOnlyClinvar() throws CellBaseException, QueryException,
}
}

@Test
// @Test
public void testIteratorLicensedHGMD() throws CellBaseException, QueryException, IllegalAccessException {
// Token with licensed HGMD, so only CLINVAR and HGMD are allowed
ClinicalVariantQuery query = new ClinicalVariantQuery();
Expand Down

0 comments on commit a58072c

Please sign in to comment.