@Test public void should_throw_an_exception_if_a_wrong_date_format_is_used() { String desiredDate = "2015"; String desiredDateFormat = "wrong-format"; expectedEx.expect(DandelionException.class); expectedEx.expectMessage("Wrong date pattern configured : " + desiredDateFormat); MockFilterConfig filterConfig = new MockFilterConfig(); filterConfig.addInitParameter(DandelionConfig.ASSET_VERSIONING_MODE.getName(), "auto"); filterConfig.addInitParameter(DandelionConfig.ASSET_VERSIONING_STRATEGY.getName(), "fixed"); filterConfig.addInitParameter(DandelionConfig.ASSET_FIXED_VERSION_TYPE.getName(), "date"); filterConfig.addInitParameter(DandelionConfig.ASSET_FIXED_VERSION_DATEPATTERN.getName(), desiredDateFormat); filterConfig.addInitParameter(DandelionConfig.ASSET_FIXED_VERSION_VALUE.getName(), desiredDate); new Context(filterConfig); }
@Override public String getName() { return "fixed"; }
FixedAssetVersioningStrategy extends AbstractAssetVersioningStrategy { @Override public String getName() { return "fixed"; } }
FixedAssetVersioningStrategy extends AbstractAssetVersioningStrategy { @Override public String getName() { return "fixed"; }  }
FixedAssetVersioningStrategy extends AbstractAssetVersioningStrategy { @Override public String getName() { return "fixed"; }  @Override String getName(); @Override void init(Context context); @Override String getAssetVersion(Asset asset); }
FixedAssetVersioningStrategy extends AbstractAssetVersioningStrategy { @Override public String getName() { return "fixed"; }  @Override String getName(); @Override void init(Context context); @Override String getAssetVersion(Asset asset);  }