Skip to content
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

added test database #378

Merged
merged 2 commits into from
Apr 4, 2022
Merged

added test database #378

merged 2 commits into from
Apr 4, 2022

Conversation

EvenSol
Copy link
Collaborator

@EvenSol EvenSol commented Mar 28, 2022

Added a database that will only be used for testing

NeqSimTest base class used to set all tests to use test database. All tests set to extend NeqSimTest class.
@EvenSol
Copy link
Collaborator Author

EvenSol commented Mar 29, 2022

Implemente NeqSimTest base class.
NeqSimTest base class used to set all tests to use test database. All tests set to extend NeqSimTest class.

To change database - update
neqsim.util.database.NeqSimDataBase
.setConnectionString("jdbc:derby:classpath:data/neqsimtestdatabase");

Test classes that does not extend NeqSimTest will use the standard NeqSim parameterdatabase: data/neqsimdatabase

@EvenSol
Copy link
Collaborator Author

EvenSol commented Mar 29, 2022

/**
 * 
 */
package neqsim;

import org.junit.jupiter.api.BeforeAll;

/**
 * @author ESOL
 *
 */
public class NeqSimTest {
  public NeqSimTest() {
    //Setting NeqSim to use test parameter database
    neqsim.util.database.NeqSimDataBase
        .setConnectionString("jdbc:derby:classpath:data/neqsimtestdatabase");
  }
}

@EvenSol EvenSol linked an issue Mar 29, 2022 that may be closed by this pull request
@EvenSol EvenSol added this to the v.2.4.0 milestone Mar 29, 2022
@EvenSol EvenSol added the enhancement New feature or request label Mar 29, 2022
@EvenSol EvenSol self-assigned this Mar 29, 2022
@EvenSol EvenSol marked this pull request as ready for review March 30, 2022 08:18
@EvenSol EvenSol merged commit 022bc2c into master Apr 4, 2022
@EvenSol EvenSol deleted the create-test-database branch April 4, 2022 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Test database
1 participant