Add database configuration via command-line arguments
A new configuration setup now allows specifying a path for database properties via command-line arguments during application startup. This update also changes the call signature for `DatabaseConnection.initialize()` method to accept a path argument. Similarly, methods in `PropertiesLoader`, `PropertiesWriter`, and `MailSettings` classes were also updated to use the specified path when working with properties files. The `TestForm` class's tests were updated accordingly to handle these changes.
This commit is contained in:
1 parent
2f1d24598b
commit
49af4a3067
8 files changed
+150
-66
No files matched your search
@@ -15,7 +15,7 @@ public class TestForm {
|
||||
|
||||
@BeforeAll
|
||||
public static void testInsert() {
|
||||
Assertions.assertDoesNotThrow(DatabaseConnection::initialize);
|
||||
Assertions.assertDoesNotThrow(() -> DatabaseConnection.initialize());
|
||||
StoreFormQuery storeFormQuery = new StoreFormQuery();
|
||||
ContactFormData contactFormData = new ContactFormData("akastijn", "[email protected]", "This is a test question.");
|
||||
storeFormQuery.storeFormForVerificationCode("[email protected]", contactFormData).
|
||||
@@ -28,7 +28,7 @@ public class TestForm {
|
||||
|
||||
@Test
|
||||
public void testRetrieveForm() {
|
||||
Assertions.assertDoesNotThrow(DatabaseConnection::initialize);
|
||||
Assertions.assertDoesNotThrow(() -> DatabaseConnection.initialize());
|
||||
new FormQuery().getFormForCode(String.valueOf(code), "[email protected]").thenAccept(result -> {
|
||||
Assertions.assertTrue(result.failReason().isEmpty());
|
||||
Optional<Form> optionalForm = result.form();
|
||||
|
||||
Reference in new issue
Block a user