-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
227 adopt refactoring of testclasswithdatabases from model tests #232
227 adopt refactoring of testclasswithdatabases from model tests #232
Conversation
…a small function to load other database scripts.
…sts to use DD's version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
Properties hibernateProperties = new Properties(); | ||
hibernateProperties.setProperty("hibernate.driver", "org.postgresql.Driver"); | ||
hibernateProperties.setProperty("hibernate.url", postgres.getJdbcUrl()); | ||
hibernateProperties.setProperty("hibernate.user", postgres.getUsername()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's so much nicer that this is loaded from a config dynamically instead of my hardcoded version!
import us.freeandfair.corla.math.Audit; | ||
import us.freeandfair.corla.model.CVRContestInfo; | ||
import us.freeandfair.corla.model.CastVoteRecord; | ||
import us.freeandfair.corla.model.CastVoteRecord.RecordType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing the changes in this file are just because you're now loading the data via an SQL file instead of manually adding it?
This combines the refactoring done by DD to get TestClassWithDatabases to use test.properties with the refactoring done by @umbernhard to bring a lot of the repeated functions into the base class.