@Test public void testClientLoadingIsDisabledOnLaunchPage() { productModel = context.request().adaptTo(ProductImpl.class); Assert.assertTrue(productModel.loadClientPrice()); Page launch = context.pageManager().getPage("/content/launches/2020/09/14/mylaunch" + PAGE); Whitebox.setInternalState(productModel, "currentPage", launch); Assert.assertFalse(productModel.loadClientPrice()); }
@Override public Boolean loadClientPrice() { return loadClientPrice && !LaunchUtils.isLaunchBasedPath(currentPage.getPath()); }
ProductImpl implements Product { @Override public Boolean loadClientPrice() { return loadClientPrice && !LaunchUtils.isLaunchBasedPath(currentPage.getPath()); } }
ProductImpl implements Product { @Override public Boolean loadClientPrice() { return loadClientPrice && !LaunchUtils.isLaunchBasedPath(currentPage.getPath()); }  }
ProductImpl implements Product { @Override public Boolean loadClientPrice() { return loadClientPrice && !LaunchUtils.isLaunchBasedPath(currentPage.getPath()); }  @Override Boolean getFound(); @Override String getName(); @Override String getDescription(); @Override String getSku(); @Override String getCurrency(); @Override Double getPrice(); @Override Price getPriceRange(); @Override Boolean getInStock(); @Override Boolean isConfigurable(); @Override Boolean isGroupedProduct(); @Override Boolean isVirtualProduct(); @Override Boolean isBundleProduct(); @Override String getVariantsJson(); @Override List<Variant> getVariants(); @Override List<GroupItem> getGroupedProductItems(); @Override List<Asset> getAssets(); @Override String getAssetsJson(); @Override List<VariantAttribute> getVariantAttributes(); @Override Boolean loadClientPrice(); @Override String getFormattedPrice(); @Override AbstractProductRetriever getProductRetriever(); }
ProductImpl implements Product { @Override public Boolean loadClientPrice() { return loadClientPrice && !LaunchUtils.isLaunchBasedPath(currentPage.getPath()); }  @Override Boolean getFound(); @Override String getName(); @Override String getDescription(); @Override String getSku(); @Override String getCurrency(); @Override Double getPrice(); @Override Price getPriceRange(); @Override Boolean getInStock(); @Override Boolean isConfigurable(); @Override Boolean isGroupedProduct(); @Override Boolean isVirtualProduct(); @Override Boolean isBundleProduct(); @Override String getVariantsJson(); @Override List<Variant> getVariants(); @Override List<GroupItem> getGroupedProductItems(); @Override List<Asset> getAssets(); @Override String getAssetsJson(); @Override List<VariantAttribute> getVariantAttributes(); @Override Boolean loadClientPrice(); @Override String getFormattedPrice(); @Override AbstractProductRetriever getProductRetriever();  }