To run the Application, first run DatabaseServer, allow about 10 seconds to let the server completely start up, then run Client
To run DatabaseServer and APIGetter:
- Create an account at API-Sports
- On the left sidebar, click accounts, then My Access, then you should see your API key next to a red button "Reset My API Key"
- In IntelliJ, open DatabaseServer.java, then select Current File, then click the three dots, then Edit Configuration, then Run with Parameters
- Then select Modify options, then select Environment Variables
- Write "API_KEY={your api key}" in the box that says Environment Variables
- Click apply, then you should be able to run the DatabaseServer and let it connect to sports API
Detailed Build Information:
Download the javafx SDK for your particular machine here: https://openjfx.io/. unzip the file. also good at this point to open the lib file and copy that path
Open our project in intellij and open project structure (command ; on mac, control alt shift s on windows)
Go to libraries. there should already be options there listed for "maven org.openjfx" If not, go to the maven sidebar, hit reload maven projects. Then, hit download sources and documentations. Then navigate back to the window you were at before.
Hit the plus option, then from java. then navigate to where you unzipped that file, open the lib file within there, then select everything within the lib file
Hit apply and then save
Go near the run button in the upper right corner where it might say "current file" and select edit configuration
You might need to create a new configuration. hit + -> application. module should be whatever jdk you have. -cp should be Client. main class should be the Client class.
Click "modify options" and select "vm options". a new textbox should pop up
--module-path "/Users/julianalg/Downloads/javafx-sdk-23.0.2/lib" --add-modules javafx.controls,javafx.fxml paste this into that box that says VM options, but replace what i have in quotes with what you copied earlier, the path of the lib folder on your machine
Hit apply and ok
Installing Mockito:
Go to the maven sidebar, reload and download sources. If that doesn't work, check if Mockito is downloaded to your maven. If it isn't, you will have to download manually and edit runtime configs.
VM Options used:
For Client: --module-path "/Users/andy/Downloads/javafx-sdk-23.0.2/lib" --add-modules=javafx.controls
For AllTests: --module-path "/Users/andy/Downloads/javafx-sdk-23.0.2/lib" --add-modules=javafx.controls --add-exports javafx.graphics/com.sun.javafx.application=ALL-UNNAMED
To run all tests, start DatabaseServer.java, then wait a few seconds before running all the tests.
Run ClientTest.java separate from the other tests.