mirror of
https://github.com/austinried/subtracks.git
synced 2025-12-27 09:09:29 +01:00
switch to just using source models (no extra db fields) start re-implementing sync service
35 lines
791 B
Dart
35 lines
791 B
Dart
import 'package:subtracks/sources/subsonic/client.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
import 'http.dart';
|
|
|
|
enum Servers {
|
|
navidrome,
|
|
gonic,
|
|
}
|
|
|
|
Map<Servers, SubsonicClient> testServerClients() => {
|
|
Servers.navidrome: SubsonicClient(
|
|
http: TestHttpClient(),
|
|
address: Uri.parse('http://localhost:4533/'),
|
|
username: 'admin',
|
|
password: 'password',
|
|
),
|
|
Servers.gonic: SubsonicClient(
|
|
http: TestHttpClient(),
|
|
address: Uri.parse('http://localhost:4747/'),
|
|
username: 'admin',
|
|
password: 'admin',
|
|
),
|
|
};
|
|
|
|
void groupByTestServer(void Function(SubsonicClient client) callback) {
|
|
final clients = testServerClients();
|
|
|
|
for (final MapEntry(key: server, value: client) in clients.entries) {
|
|
group(server.name, () {
|
|
callback(client);
|
|
});
|
|
}
|
|
}
|