public TestCallContext(final String userName) { this(userName, new DefaultClock().getUTCNow(), new DefaultClock().getUTCNow()); }
public DefaultPersistentBus(final DataSource dataSource, final Properties properties) { this(InTransaction.buildDDBI(dataSource), new DefaultClock(), new ConfigurationObjectFactory(properties).buildWithReplacements(PersistentBusConfig.class, ImmutableMap.<String, String>of("instanceName", "main")), new MetricRegistry(), new DatabaseTransactionNotificationApi()); }
public DefaultNotificationQueueService(final DataSource dataSource, final Properties properties) { this(InTransaction.buildDDBI(dataSource), new DefaultClock(), new ConfigurationObjectFactory(new SimplePropertyConfigSource(properties)).buildWithReplacements(NotificationQueueConfig.class, ImmutableMap.<String, String>of("instanceName", "main")), new MetricRegistry()); }
public TestCallContext(final String userName) { this(userName, new DefaultClock().getUTCNow(), new DefaultClock().getUTCNow()); }
@BeforeClass(groups = "fast") protected void beforeClass() throws Exception { if (hasFailed()) { return; } super.beforeClass(); final Clock clock = new DefaultClock(); this.account = new MockAccountBuilder().name(UUID.randomUUID().toString().substring(1, 8)) .firstNameLength(6) .email(UUID.randomUUID().toString().substring(1, 8)) .phone(UUID.randomUUID().toString().substring(1, 8)) .migrated(false) .externalKey(UUID.randomUUID().toString().substring(1, 8)) .billingCycleDayLocal(31) .currency(Currency.USD) .paymentMethodId(UUID.randomUUID()) .timeZone(DateTimeZone.UTC) .build(); }
@Override @BeforeClass(groups = "slow") public void setUpBeforeClass() throws Exception { super.setUpBeforeClass(); this.dao = new TestPluginPaymentDao(embeddedDB.getDataSource()); final Clock clock = new DefaultClock(); final UUID tenantId = UUID.randomUUID(); context = Mockito.mock(CallContext.class); Mockito.when(context.getTenantId()).thenReturn(tenantId); account = TestUtils.buildAccount(Currency.JPY, "JP"); final OSGIKillbillAPI killbillApi = TestUtils.buildOSGIKillbillAPI(account); final Payment payment = TestUtils.buildPayment(account.getId(), account.getPaymentMethodId(), account.getCurrency(), killbillApi); final OSGIKillbillLogService logService = TestUtils.buildLogService(); final OSGIConfigPropertiesService configPropertiesService = Mockito.mock(OSGIConfigPropertiesService.class); api = new TestPaymentPluginApi(killbillApi, configPropertiesService, logService, clock, dao); TestUtils.updateOSGIKillbillAPI(killbillApi, api); }