refactored to make use of the ServiceType enum throughout backend and frontend for typesafety

This commit is contained in:
2026-06-24 23:25:18 +02:00
parent 38c72d1bb8
commit fb64a7787f
24 changed files with 278 additions and 263 deletions
@@ -6,6 +6,7 @@ import org.junit.jupiter.api.Test;
import com.vaessl.app.exception.EmptyCredentialsException;
import static com.vaessl.app.Mockdata.*;
import static com.vaessl.app.connection.ServiceType.HOMEBOX;
import static org.assertj.core.api.Assertions.assertThat;
class HomeboxConnectionProviderTest {
@@ -13,8 +14,9 @@ class HomeboxConnectionProviderTest {
private final HomeboxConnectionProvider provider = new HomeboxConnectionProvider(null, null);
@Test
void checkCredentials_ShouldThrowException_WhenFieldsAreMissing() {
ConnectionRequest request = new ConnectionRequest(MOCK_URL, "HOMEBOX", null, null, false);
void checkCredentialsShouldThrowExceptionWhenFieldsAreMissing() {
ConnectionRequest request =
new ConnectionRequest(MOCK_URL, HOMEBOX, null, null, false);
EmptyCredentialsException exception = assertThrows(EmptyCredentialsException.class, () -> {
provider.checkCredentials(request);