Search in sources :

Example 1 with EmptyCandlepinQuery

use of org.candlepin.model.EmptyCandlepinQuery in project candlepin by candlepin.

the class ContentResourceTest method listContent.

@Test
public void listContent() {
    when(cc.listAll()).thenReturn(new EmptyCandlepinQuery());
    cr.list();
    verify(cc, atLeastOnce()).listAll();
}
Also used : EmptyCandlepinQuery(org.candlepin.model.EmptyCandlepinQuery) Test(org.junit.Test)

Example 2 with EmptyCandlepinQuery

use of org.candlepin.model.EmptyCandlepinQuery in project candlepin by candlepin.

the class CertificateSerialResourceTest method listall.

@Test
public void listall() {
    CandlepinQuery cqmock = new EmptyCandlepinQuery();
    CertificateSerialCurator csc = mock(CertificateSerialCurator.class);
    when(csc.listAll()).thenReturn(cqmock);
    CertificateSerialResource csr = new CertificateSerialResource(csc, this.modelTranslator);
    CandlepinQuery<CertificateSerialDTO> result = csr.getCertificateSerials();
    assertNotNull(result);
    verify(csc, times(1)).listAll();
}
Also used : CertificateSerialDTO(org.candlepin.dto.api.v1.CertificateSerialDTO) CandlepinQuery(org.candlepin.model.CandlepinQuery) EmptyCandlepinQuery(org.candlepin.model.EmptyCandlepinQuery) EmptyCandlepinQuery(org.candlepin.model.EmptyCandlepinQuery) CertificateSerialCurator(org.candlepin.model.CertificateSerialCurator) Test(org.junit.Test)

Aggregations

EmptyCandlepinQuery (org.candlepin.model.EmptyCandlepinQuery)2 Test (org.junit.Test)2 CertificateSerialDTO (org.candlepin.dto.api.v1.CertificateSerialDTO)1 CandlepinQuery (org.candlepin.model.CandlepinQuery)1 CertificateSerialCurator (org.candlepin.model.CertificateSerialCurator)1