Search in sources :

Example 1 with BeaconQueryServiceImpl

use of org.molgenis.beacon.service.impl.BeaconQueryServiceImpl in project molgenis by molgenis.

the class BeaconQueryServiceTest method beforeMethod.

@BeforeMethod
public void beforeMethod() {
    initMocks(this);
    dataset1 = mock(BeaconDataset.class, RETURNS_DEEP_STUBS);
    when(dataset1.getId()).thenReturn("dataset1");
    when(dataset1.getDatasetEntityType().getId()).thenReturn("dataset1");
    when(dataset1.getGenomeBrowserAttributes().getChrom()).thenReturn("#CHROM");
    when(dataset1.getGenomeBrowserAttributes().getPos()).thenReturn("POS");
    when(dataset1.getGenomeBrowserAttributes().getRef()).thenReturn("REF");
    when(dataset1.getGenomeBrowserAttributes().getAlt()).thenReturn("ALT");
    dataset2 = mock(BeaconDataset.class, RETURNS_DEEP_STUBS);
    when(dataset2.getId()).thenReturn("dataset2");
    when(dataset2.getDatasetEntityType().getId()).thenReturn("dataset2");
    when(dataset2.getGenomeBrowserAttributes().getChrom()).thenReturn("#CHROM");
    when(dataset2.getGenomeBrowserAttributes().getPos()).thenReturn("POS");
    when(dataset2.getGenomeBrowserAttributes().getRef()).thenReturn("REF");
    when(dataset2.getGenomeBrowserAttributes().getAlt()).thenReturn("ALT");
    query1 = new QueryImpl<>().eq(dataset1.getGenomeBrowserAttributes().getChrom(), "1").and().eq(dataset1.getGenomeBrowserAttributes().getPos(), 100L).and().eq(dataset1.getGenomeBrowserAttributes().getRef(), "A").and().eq(dataset1.getGenomeBrowserAttributes().getAlt(), "T");
    query2 = new QueryImpl<>().eq(dataset2.getGenomeBrowserAttributes().getChrom(), "1").and().eq(dataset2.getGenomeBrowserAttributes().getPos(), 100L).and().eq(dataset2.getGenomeBrowserAttributes().getRef(), "A").and().eq(dataset2.getGenomeBrowserAttributes().getAlt(), "T");
    beaconQueryService = new BeaconQueryServiceImpl(dataService);
}
Also used : QueryImpl(org.molgenis.data.support.QueryImpl) BeaconQueryServiceImpl(org.molgenis.beacon.service.impl.BeaconQueryServiceImpl) BeaconDataset(org.molgenis.beacon.config.BeaconDataset) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

BeaconDataset (org.molgenis.beacon.config.BeaconDataset)1 BeaconQueryServiceImpl (org.molgenis.beacon.service.impl.BeaconQueryServiceImpl)1 QueryImpl (org.molgenis.data.support.QueryImpl)1 BeforeMethod (org.testng.annotations.BeforeMethod)1