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
@@ -12,6 +12,8 @@ import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import com.vaessl.app.connection.ConnectionRepository;
import com.vaessl.app.exception.ConnectionNotFoundException;
import static com.vaessl.app.connection.ServiceType.HOMEBOX;
@ExtendWith(MockitoExtension.class)
class HomeboxSearchProviderTest {
@@ -27,7 +29,7 @@ class HomeboxSearchProviderTest {
when(mockRepo.findByAppUrlAndUsername(MOCK_URL, MOCK_USER)).thenReturn(null);
SearchRequest request = new SearchRequest(MOCK_URL, MOCK_USER, "test query", "HOMEBOX");
SearchRequest request = new SearchRequest(MOCK_URL, MOCK_USER, "test query", HOMEBOX);
Pageable pageable = PageRequest.of(0, 10);
assertThrows(ConnectionNotFoundException.class,
() -> provider.getSearchResults(request, pageable));