final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr0 = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE, Result.FOO); final DefaultCaseChangeResult cr1 = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE, Result.BAR); final DefaultCaseChangeResult cr2 = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE, Result.TINKYWINKY); final DefaultCaseChangeResult cr3 = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE, final DefaultCaseChangeResult cr4 = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE,
protected void assertion(final Result result, final DefaultCaseChangeResult cr, final String fromProductName, final String toProductName, final BillingPeriod fromBp, final BillingPeriod toBp, final String fromPriceListName, final String toPriceListName, final PhaseType phaseType, final StandaloneCatalog cat) { try { Assert.assertEquals(result, cr.getResult(new PlanPhaseSpecifier(fromProductName, fromBp, fromPriceListName, phaseType), new PlanSpecifier(toProductName, toBp, toPriceListName), cat)); } catch (CatalogApiException e) { Assert.fail("", e); } } }
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, null,
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE,
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE,
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE,
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE,
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE,
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( product1, null, ProductCategory.BASE, ProductCategory.BASE,
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( null, product2, ProductCategory.BASE, ProductCategory.BASE,
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( product1, product2, null, ProductCategory.BASE,
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE,
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr0 = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE, Result.FOO); final DefaultCaseChangeResult cr1 = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE, Result.BAR); final DefaultCaseChangeResult cr2 = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE, Result.TINKYWINKY); final DefaultCaseChangeResult cr3 = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE, final DefaultCaseChangeResult cr4 = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE,
public DefaultCaseChangeResult(final DefaultProduct from, final DefaultProduct to, final ProductCategory fromProductCategory, final ProductCategory toProductCategory, final BillingPeriod fromBP, final BillingPeriod toBP, final DefaultPriceList fromPriceList, final DefaultPriceList toPriceList, final PhaseType fromType, final Result result) { setFromProduct(from); setToProduct(to); setFromProductCategory(fromProductCategory); setToProductCategory(toProductCategory); setFromPriceList(fromPriceList); setToPriceList(toPriceList); setFromBillingPeriod(fromBP); setToBillingPeriod(toBP); setPhaseType(fromType); this.result = result; }
protected void assertion(final Result result, final DefaultCaseChangeResult cr, final String fromProductName, final String toProductName, final BillingPeriod fromBp, final BillingPeriod toBp, final String fromPriceListName, final String toPriceListName, final PhaseType phaseType, final StandaloneCatalog cat) { try { Assert.assertEquals(result, cr.getResult(new PlanPhaseSpecifier(fromProductName, fromBp, fromPriceListName, phaseType), new PlanSpecifier(toProductName, toBp, toPriceListName), cat)); } catch (CatalogApiException e) { Assert.fail("", e); } } }
protected void assertionException(final DefaultCaseChangeResult cr, final String fromProductName, final String toProductName, final BillingPeriod fromBp, final BillingPeriod toBp, final String fromPriceListName, final String toPriceListName, final PhaseType phaseType, final StandaloneCatalog cat) { try { cr.getResult(new PlanPhaseSpecifier(fromProductName, fromBp, fromPriceListName, phaseType), new PlanSpecifier(toProductName, toBp, toPriceListName), cat); Assert.fail("Expecting an exception"); } catch (CatalogApiException e) { Assert.assertEquals(e.getCode(), ErrorCode.CAT_PRICE_LIST_NOT_FOUND.getCode()); } }
protected void assertionNull(final DefaultCaseChangeResult cr, final String fromProductName, final String toProductName, final ProductCategory fromProductCategory, final ProductCategory toProductCategory, final BillingPeriod fromBp, final BillingPeriod toBp, final String fromPriceListName, final String toPriceListName, final PhaseType phaseType, final StandaloneCatalog cat) { try { Assert.assertNull(cr.getResult(new PlanPhaseSpecifier(fromProductName, fromBp, fromPriceListName, phaseType), new PlanSpecifier(toProductName, toBp, toPriceListName), cat)); } catch (CatalogApiException e) { Assert.fail("", e); } }
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, null,
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( product1, product2, null, ProductCategory.BASE,
final DefaultPriceList priceList2 = cat.getPriceLists().getChildPriceLists()[1]; final DefaultCaseChangeResult cr = new DefaultCaseChangeResult( product1, product2, ProductCategory.BASE, ProductCategory.BASE,