@Test public void initilizeTest() { Flyway mockedFlyway = Mockito.mock(Flyway.class); databaseAnalytics.initialize(mockedFlyway); verify(transactionFactory, atLeastOnce()).getDataSource(); verify(flyway, atLeastOnce()).setLocations("com/intuit/wasabi/repository/impl/mysql/migration"); verify(flyway, atLeastOnce()).setDataSource(dataSource); verify(flyway, atLeastOnce()).migrate(); }
void initialize(Flyway flyway) { flyway.setLocations("com/intuit/wasabi/repository/impl/mysql/migration"); flyway.setDataSource(transactionFactory.getDataSource()); flyway.migrate(); }
DatabaseAnalytics implements AnalyticsRepository { void initialize(Flyway flyway) { flyway.setLocations("com/intuit/wasabi/repository/impl/mysql/migration"); flyway.setDataSource(transactionFactory.getDataSource()); flyway.migrate(); } }
DatabaseAnalytics implements AnalyticsRepository { void initialize(Flyway flyway) { flyway.setLocations("com/intuit/wasabi/repository/impl/mysql/migration"); flyway.setDataSource(transactionFactory.getDataSource()); flyway.migrate(); } @Inject  DatabaseAnalytics(TransactionFactory transactionFactory, Flyway flyway); }
DatabaseAnalytics implements AnalyticsRepository { void initialize(Flyway flyway) { flyway.setLocations("com/intuit/wasabi/repository/impl/mysql/migration"); flyway.setDataSource(transactionFactory.getDataSource()); flyway.migrate(); } @Inject  DatabaseAnalytics(TransactionFactory transactionFactory, Flyway flyway); @Override List<Map> getRollupRows(Experiment.ID experimentId, String rollupDate, Parameters parameters); @Override List<Map> getActionsRows(Experiment.ID experimentID, Parameters parameters); @Override List<Map> getJointActions(Experiment.ID experimentID, Parameters parameters); @Override List<Map> getImpressionRows(Experiment.ID experimentID, Parameters parameters); @Override Map<Bucket.Label, BucketCounts> getEmptyBuckets(Experiment.ID experimentID); @Override List<Map> getCountsFromRollups(Experiment.ID experimentID, Parameters parameters); @Override boolean checkMostRecentRollup(Experiment experiment, Parameters parameters, Date to); }
DatabaseAnalytics implements AnalyticsRepository { void initialize(Flyway flyway) { flyway.setLocations("com/intuit/wasabi/repository/impl/mysql/migration"); flyway.setDataSource(transactionFactory.getDataSource()); flyway.migrate(); } @Inject  DatabaseAnalytics(TransactionFactory transactionFactory, Flyway flyway); @Override List<Map> getRollupRows(Experiment.ID experimentId, String rollupDate, Parameters parameters); @Override List<Map> getActionsRows(Experiment.ID experimentID, Parameters parameters); @Override List<Map> getJointActions(Experiment.ID experimentID, Parameters parameters); @Override List<Map> getImpressionRows(Experiment.ID experimentID, Parameters parameters); @Override Map<Bucket.Label, BucketCounts> getEmptyBuckets(Experiment.ID experimentID); @Override List<Map> getCountsFromRollups(Experiment.ID experimentID, Parameters parameters); @Override boolean checkMostRecentRollup(Experiment experiment, Parameters parameters, Date to);  }