refactored to make use of the ServiceType enum throughout backend and frontend for typesafety
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user