Package org.candlepin.model

Examples of org.candlepin.model.SubscriptionCurator


    @Test
    public void testImportRecordDeleteWithLogging()
        throws IOException, ImporterException {
        EventSink es = mock(EventSink.class);
        ExporterMetadataCurator ec = mock(ExporterMetadataCurator.class);
        SubscriptionCurator sc = mock(SubscriptionCurator.class);
        OwnerResource thisOwnerResource = new OwnerResource(ownerCurator, sc,
            null, null, null, i18n, es, null, null, null, null, null, ec,
            null, importRecordCurator, null, null, null, null, null,
            null, null, null, contentOverrideValidator,
            serviceLevelValidator, null);

        ExporterMetadata metadata = new ExporterMetadata();
        when(ec.lookupByTypeAndOwner(ExporterMetadata.TYPE_PER_USER, owner))
            .thenReturn(metadata);
        when(sc.listByOwner(owner)).thenReturn(new ArrayList<Subscription>());

        thisOwnerResource.undoImports(owner.getKey(),
            new UserPrincipal("JarJarBinks", null, true));
        List<ImportRecord> records = importRecordCurator.findRecords(owner);
        assertTrue(records.size() == 1);
View Full Code Here

TOP

Related Classes of org.candlepin.model.SubscriptionCurator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.