Package org.candlepin.resource

Examples of org.candlepin.resource.ProductResource


    @Test(expected = BadRequestException.class)
    public void testDeleteProductWithSubscriptions() {
        ProductServiceAdapter pa = mock(ProductServiceAdapter.class);
        I18n i18n = I18nFactory.getI18n(getClass(), Locale.US, I18nFactory.FALLBACK);
        ProductResource pr = new ProductResource(pa, null, null, null, i18n);
        Product p = mock(Product.class);
        when(pa.getProductById(eq("10"))).thenReturn(p);
        Set<Subscription> subs = new HashSet<Subscription>();
        Subscription s = mock(Subscription.class);
        subs.add(s);
        when(pa.productHasSubscriptions(eq(p))).thenReturn(true);

        pr.deleteProduct("10");
    }
View Full Code Here

TOP

Related Classes of org.candlepin.resource.ProductResource

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.