Codota Logo
DefaultOverdueStateSet.findState
Code IndexAdd Codota to your IDE (free)

How to use
findState
method
in
com.ning.billing.overdue.config.DefaultOverdueStateSet

Best Java code snippets using com.ning.billing.overdue.config.DefaultOverdueStateSet.findState (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: com.ning.billing/killbill-overdue

@Test(groups = "slow")
public void testApplicator() throws Exception {
  final InputStream is = new ByteArrayInputStream(testOverdueHelper.getConfigXml().getBytes());
  final OverdueConfig config = XMLLoader.getObjectFromStreamNoValidation(is, OverdueConfig.class);
  overdueWrapperFactory.setOverdueConfig(config);
  final Account account = Mockito.mock(Account.class);
  Mockito.when(account.getId()).thenReturn(UUID.randomUUID());
  final OverdueStateSet overdueStateSet = config.getStateSet();
  final OverdueState clearState = config.getStateSet().findState(DefaultBlockingState.CLEAR_STATE_NAME);
  OverdueState state;
  state = config.getStateSet().findState("OD1");
  applicator.apply(overdueStateSet, null, account, clearState, state, internalCallContext);
  testOverdueHelper.checkStateApplied(state);
  checkBussEvent("OD1");
  state = config.getStateSet().findState("OD2");
  applicator.apply(overdueStateSet, null, account, clearState, state, internalCallContext);
  testOverdueHelper.checkStateApplied(state);
  checkBussEvent("OD2");
  state = config.getStateSet().findState("OD3");
  applicator.apply(overdueStateSet, null, account, clearState, state, internalCallContext);
  testOverdueHelper.checkStateApplied(state);
  checkBussEvent("OD3");
}
origin: com.ning.billing/killbill-overdue

  @Test(groups = "slow")
  public void testWrapperNoConfig() throws Exception {
    overdueWrapperFactory.setOverdueConfig(null);

    final Account account;
    final OverdueWrapper wrapper;
    final OverdueState state;

    final InputStream is = new ByteArrayInputStream(testOverdueHelper.getConfigXml().getBytes());
    final OverdueConfig config = XMLLoader.getObjectFromStreamNoValidation(is, OverdueConfig.class);
    state = config.getStateSet().findState(DefaultBlockingState.CLEAR_STATE_NAME);
    account = testOverdueHelper.createAccount(clock.getUTCToday().minusDays(31));
    wrapper = overdueWrapperFactory.createOverdueWrapperFor(account);
    final OverdueState result = wrapper.refresh(internalCallContext);

    Assert.assertEquals(result.getName(), state.getName());
    Assert.assertEquals(result.blockChanges(), state.blockChanges());
    Assert.assertEquals(result.disableEntitlementAndChangesBlocked(), state.disableEntitlementAndChangesBlocked());
  }
}
origin: com.ning.billing/killbill-overdue

@Test(groups = "slow")
public void testWrapperBasic() throws Exception {
  final InputStream is = new ByteArrayInputStream(testOverdueHelper.getConfigXml().getBytes());
  final OverdueConfig config = XMLLoader.getObjectFromStreamNoValidation(is, OverdueConfig.class);
  overdueWrapperFactory.setOverdueConfig(config);
  Account account;
  OverdueWrapper wrapper;
  OverdueState state;
  state = config.getStateSet().findState("OD1");
  account = testOverdueHelper.createAccount(clock.getUTCToday().minusDays(31));
  wrapper = overdueWrapperFactory.createOverdueWrapperFor(account);
  wrapper.refresh(internalCallContext);
  testOverdueHelper.checkStateApplied(state);
  state = config.getStateSet().findState("OD2");
  account = testOverdueHelper.createAccount(clock.getUTCToday().minusDays(41));
  wrapper = overdueWrapperFactory.createOverdueWrapperFor(account);
  wrapper.refresh(internalCallContext);
  testOverdueHelper.checkStateApplied(state);
  state = config.getStateSet().findState("OD3");
  account = testOverdueHelper.createAccount(clock.getUTCToday().minusDays(51));
  wrapper = overdueWrapperFactory.createOverdueWrapperFor(account);
  wrapper.refresh(internalCallContext);
  testOverdueHelper.checkStateApplied(state);
}
com.ning.billing.overdue.configDefaultOverdueStateSetfindState

Popular methods of DefaultOverdueStateSet

  • getStates
  • getClearState
  • getInitialReevaluationInterval
  • size

Popular in Java

  • Start an intent from android
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now