final DefaultPriceList priceList = cat.getPriceLists().getDefaultPricelist(); final CaseResult cr0 = new CaseResult( product, ProductCategory.BASE, Result.FOO); final CaseResult cr1 = new CaseResult( product, ProductCategory.BASE, Result.BAR); final CaseResult cr2 = new CaseResult( product, ProductCategory.BASE, Result.TINKYWINKY); final CaseResult cr3 = new CaseResult( product, ProductCategory.BASE, final CaseResult cr4 = new CaseResult( product, ProductCategory.BASE,
@Test(groups = "fast") public void testWildCardPhaseType() { final MockCatalog cat = new MockCatalog(); final DefaultProduct product = cat.getCurrentProducts()[0]; final DefaultPriceList priceList = cat.getPriceLists().getDefaultPricelist(); final CaseResult cr = new CaseResult( product, ProductCategory.BASE, BillingPeriod.MONTHLY, priceList, null, Result.FOO); assertion(Result.FOO, cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, cat.getCurrentProducts()[1].getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.ADD_ON, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.BASE, BillingPeriod.ANNUAL, priceList.getName(), PhaseType.EVERGREEN, cat); assertionException(cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, "dipsy", PhaseType.EVERGREEN, cat); assertion(Result.FOO, cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.TRIAL, cat); }
@Test(groups = "fast") public void testWildCardBillingPeriod() { final MockCatalog cat = new MockCatalog(); final DefaultProduct product = cat.getCurrentProducts()[0]; final DefaultPriceList priceList = cat.getPriceLists().getDefaultPricelist(); final CaseResult cr = new CaseResult( product, ProductCategory.BASE, null, priceList, PhaseType.EVERGREEN, Result.FOO); assertion(Result.FOO, cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, cat.getCurrentProducts()[1].getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.ADD_ON, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertion(Result.FOO, cr, product.getName(), ProductCategory.BASE, BillingPeriod.ANNUAL, priceList.getName(), PhaseType.EVERGREEN, cat); assertionException(cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, "dipsy", PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.TRIAL, cat); }
@Test(groups = "fast") public void testWildCardPriceList() { final MockCatalog cat = new MockCatalog(); final DefaultProduct product = cat.getCurrentProducts()[0]; final DefaultPriceList priceList = cat.getPriceLists().getDefaultPricelist(); final CaseResult cr = new CaseResult( product, ProductCategory.BASE, BillingPeriod.MONTHLY, null, PhaseType.EVERGREEN, Result.FOO); assertion(Result.FOO, cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, cat.getCurrentProducts()[1].getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.ADD_ON, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.BASE, BillingPeriod.ANNUAL, priceList.getName(), PhaseType.EVERGREEN, cat); assertion(Result.FOO, cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, "dipsy", PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.TRIAL, cat); }
@Test(groups = "fast") public void testBasic() { final MockCatalog cat = new MockCatalog(); final DefaultProduct product = cat.getCurrentProducts()[0]; final DefaultPriceList priceList = cat.getPriceLists().getDefaultPricelist(); final CaseResult cr = new CaseResult( product, ProductCategory.BASE, BillingPeriod.MONTHLY, priceList, PhaseType.EVERGREEN, Result.FOO); assertion(Result.FOO, cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, cat.getCurrentProducts()[1].getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.ADD_ON, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.BASE, BillingPeriod.ANNUAL, priceList.getName(), PhaseType.EVERGREEN, cat); assertionException(cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, "dipsy", PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.TRIAL, cat); }
@Test(groups = "fast") public void testWildCardProductCategory() { final MockCatalog cat = new MockCatalog(); final DefaultProduct product = cat.getCurrentProducts()[0]; final DefaultPriceList priceList = cat.getPriceLists().getDefaultPricelist(); final CaseResult cr = new CaseResult( product, null, BillingPeriod.MONTHLY, priceList, PhaseType.EVERGREEN, Result.FOO); assertion(Result.FOO, cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, cat.getCurrentProducts()[1].getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertion(Result.FOO, cr, product.getName(), ProductCategory.ADD_ON, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.BASE, BillingPeriod.ANNUAL, priceList.getName(), PhaseType.EVERGREEN, cat); assertionException(cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, "dipsy", PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.TRIAL, cat); }
@Test(groups = "fast") public void testWildCardProduct() { final MockCatalog cat = new MockCatalog(); final DefaultProduct product = cat.getCurrentProducts()[0]; final DefaultPriceList priceList = cat.getPriceLists().getDefaultPricelist(); final CaseResult cr = new CaseResult( null, ProductCategory.BASE, BillingPeriod.MONTHLY, priceList, PhaseType.EVERGREEN, Result.FOO); assertion(Result.FOO, cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertion(Result.FOO, cr, cat.getCurrentProducts()[1].getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.ADD_ON, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.BASE, BillingPeriod.ANNUAL, priceList.getName(), PhaseType.EVERGREEN, cat); assertionException(cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, "dipsy", PhaseType.EVERGREEN, cat); assertionNull(cr, product.getName(), ProductCategory.BASE, BillingPeriod.MONTHLY, priceList.getName(), PhaseType.TRIAL, cat); }