Guest User

Untitled

a guest
Mar 12th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. db {
  2. default.driver=com.mysql.jdbc.Driver
  3. default.url="jdbc:mysql://localhost:3306/production?useSSL=false"
  4. default.username=root
  5. default.password="**********"
  6.  
  7. test.driver=com.mysql.jdbc.Driver
  8. test.url="jdbc:mysql://localhost:3306/test?useSSL=false"
  9. test.username=root
  10. test.password="**********"}
  11.  
  12. public class EventDaoImpl implements EventDao {
  13.  
  14. private Database database;
  15.  
  16. @Inject
  17. public EventRepositoryImpl(Database database) {
  18. this.database = database;
  19. }
  20.  
  21. public class EventRepositoryImplIntegrationTest {
  22.  
  23. @Inject
  24. private EventRepository eventRepository;
  25. @Before
  26. public void setup() {
  27. Module testModule = new AbstractModule() {
  28. @Override
  29. public void configure() {
  30. bind(UserDao.class).to(UserDaoImpl.class);
  31. }
  32. };
  33.  
  34. GuiceApplicationBuilder builder = new GuiceApplicationLoader()
  35. .builder(new ApplicationLoader.Context(Environment.simple()))
  36. .overrides(testModule);
  37. Guice.createInjector(builder.applicationModule()).injectMembers(this);
  38.  
  39. //Helpers.start(application);
  40. }
  41.  
  42. @After
  43. public void teardown() {
  44. //Helpers.stop(application);
  45. }
Add Comment
Please, Sign In to add comment