protected KillbillConfigSource getConfigSource(final Map<String, String> extraProperties) { return getConfigSource(null, extraProperties); }
@BeforeClass(alwaysRun = true) public void globalBeforeTest() { configSource = getConfigSource(extraPropertiesForTestSuite); skifeConfigSource = new ConfigSource() { @Override public String getString(final String propertyName) { return configSource.getString(propertyName); } }; // We need to set the instance variable in each subsequent class instantiated in the suite clock = Mockito.mock(ClockMock.class, new Answer() { @Override public Object answer(final InvocationOnMock invocation) throws Throwable { final Object answer = invocation.getMethod().invoke(theRealClock, invocation.getArguments()); final DateTime utcNow = theRealClock.getUTCNow(); if (callContext != null) { callContext.setCreatedDate(utcNow); } if (internalCallContext != null) { internalCallContext.setCreatedDate(utcNow); internalCallContext.setUpdatedDate(utcNow); } return answer; } }); }
protected KillbillConfigSource getConfigSource(final Map<String, String> extraProperties) { return getConfigSource(null, extraProperties); }
@BeforeClass(alwaysRun = true) public void globalBeforeTest() { configSource = getConfigSource(extraPropertiesForTestSuite); skifeConfigSource = new ConfigSource() { @Override public String getString(final String propertyName) { return configSource.getString(propertyName); } }; // We need to set the instance variable in each subsequent class instantiated in the suite clock = Mockito.mock(ClockMock.class, new Answer() { @Override public Object answer(final InvocationOnMock invocation) throws Throwable { final Object answer = invocation.getMethod().invoke(theRealClock, invocation.getArguments()); final DateTime utcNow = theRealClock.getUTCNow(); if (callContext != null) { callContext.setCreatedDate(utcNow); } if (internalCallContext != null) { internalCallContext.setCreatedDate(utcNow); internalCallContext.setUpdatedDate(utcNow); } return answer; } }); }