Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db {
- default.driver=com.mysql.jdbc.Driver
- default.url="jdbc:mysql://localhost:3306/production?useSSL=false"
- default.username=root
- default.password="**********"
- test.driver=com.mysql.jdbc.Driver
- test.url="jdbc:mysql://localhost:3306/test?useSSL=false"
- test.username=root
- test.password="**********"}
- public class EventDaoImpl implements EventDao {
- private Database database;
- @Inject
- public EventRepositoryImpl(Database database) {
- this.database = database;
- }
- public class EventRepositoryImplIntegrationTest {
- @Inject
- private EventRepository eventRepository;
- @Before
- public void setup() {
- Module testModule = new AbstractModule() {
- @Override
- public void configure() {
- bind(UserDao.class).to(UserDaoImpl.class);
- }
- };
- GuiceApplicationBuilder builder = new GuiceApplicationLoader()
- .builder(new ApplicationLoader.Context(Environment.simple()))
- .overrides(testModule);
- Guice.createInjector(builder.applicationModule()).injectMembers(this);
- //Helpers.start(application);
- }
- @After
- public void teardown() {
- //Helpers.stop(application);
- }
Add Comment
Please, Sign In to add comment