diff --git a/packages/nextcloud/test/core_test.dart b/packages/nextcloud/test/core_test.dart index b4248d35..9a688e7e 100644 --- a/packages/nextcloud/test/core_test.dart +++ b/packages/nextcloud/test/core_test.dart @@ -9,7 +9,7 @@ void main() { 'core', () { late DockerContainer container; - late TestNextcloudClient client; + late NextcloudClient client; setUp(() async { container = await getDockerContainer(); client = await getTestClient(container); diff --git a/packages/nextcloud/test/dashboard_test.dart b/packages/nextcloud/test/dashboard_test.dart index 97ba4f1a..d6e15de9 100644 --- a/packages/nextcloud/test/dashboard_test.dart +++ b/packages/nextcloud/test/dashboard_test.dart @@ -1,4 +1,5 @@ import 'package:nextcloud/dashboard.dart'; +import 'package:nextcloud/nextcloud.dart'; import 'package:test/test.dart'; import 'helper.dart'; @@ -8,7 +9,7 @@ void main() { 'dashboard', () { late DockerContainer container; - late TestNextcloudClient client; + late NextcloudClient client; setUp(() async { container = await getDockerContainer(); client = await getTestClient(container); diff --git a/packages/nextcloud/test/helper.dart b/packages/nextcloud/test/helper.dart index 5723bcb6..5b6dfce4 100644 --- a/packages/nextcloud/test/helper.dart +++ b/packages/nextcloud/test/helper.dart @@ -75,20 +75,7 @@ class DockerContainer { Future allLogs() async => '${await serverLogs()}\n\n${await nextcloudLogs()}'; } -class TestNextcloudClient extends NextcloudClient { - TestNextcloudClient( - super.baseURL, { - super.loginName, - super.password, - super.appPassword, - super.language, - super.appType, - super.userAgentOverride, - super.cookieJar, - }); -} - -Future getTestClient( +Future getTestClient( final DockerContainer container, { final String? username = 'user1', final AppType appType = AppType.unknown, @@ -121,7 +108,7 @@ Future getTestClient( appPassword = (result.stdout as String).split('\n')[1]; } - final client = TestNextcloudClient( + final client = NextcloudClient( Uri( scheme: 'http', host: 'localhost', diff --git a/packages/nextcloud/test/news_test.dart b/packages/nextcloud/test/news_test.dart index 567c2d0c..da054d6a 100644 --- a/packages/nextcloud/test/news_test.dart +++ b/packages/nextcloud/test/news_test.dart @@ -11,7 +11,7 @@ void main() { 'news', () { late DockerContainer container; - late TestNextcloudClient client; + late NextcloudClient client; setUp(() async { container = await getDockerContainer(); client = await getTestClient(container); diff --git a/packages/nextcloud/test/notes_test.dart b/packages/nextcloud/test/notes_test.dart index a0dad4ab..ad857e86 100644 --- a/packages/nextcloud/test/notes_test.dart +++ b/packages/nextcloud/test/notes_test.dart @@ -10,7 +10,7 @@ void main() { 'notes', () { late DockerContainer container; - late TestNextcloudClient client; + late NextcloudClient client; setUp(() async { container = await getDockerContainer(); client = await getTestClient(container); diff --git a/packages/nextcloud/test/notifications_test.dart b/packages/nextcloud/test/notifications_test.dart index ad3580c3..84ffb315 100644 --- a/packages/nextcloud/test/notifications_test.dart +++ b/packages/nextcloud/test/notifications_test.dart @@ -1,5 +1,6 @@ import 'dart:async'; +import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/notifications.dart'; import 'package:test/test.dart'; @@ -8,7 +9,7 @@ import 'helper.dart'; void main() { group('notifications', () { late DockerContainer container; - late TestNextcloudClient client; + late NextcloudClient client; setUp(() async { container = await getDockerContainer(); client = await getTestClient( @@ -107,7 +108,7 @@ void main() { group('Push', () { late DockerContainer container; - late TestNextcloudClient client; + late NextcloudClient client; setUp(() async { container = await getDockerContainer(); client = await getTestClient( diff --git a/packages/nextcloud/test/provisioning_api_test.dart b/packages/nextcloud/test/provisioning_api_test.dart index 6f175ced..7509957e 100644 --- a/packages/nextcloud/test/provisioning_api_test.dart +++ b/packages/nextcloud/test/provisioning_api_test.dart @@ -1,3 +1,4 @@ +import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/provisioning_api.dart'; import 'package:test/test.dart'; @@ -8,7 +9,7 @@ void main() { 'provisioning_api', () { late DockerContainer container; - late TestNextcloudClient client; + late NextcloudClient client; setUp(() async { container = await getDockerContainer(); client = await getTestClient( diff --git a/packages/nextcloud/test/settings_test.dart b/packages/nextcloud/test/settings_test.dart index 9ad42508..473610b7 100644 --- a/packages/nextcloud/test/settings_test.dart +++ b/packages/nextcloud/test/settings_test.dart @@ -1,5 +1,6 @@ import 'dart:convert'; +import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/settings.dart'; import 'package:test/test.dart'; @@ -10,7 +11,7 @@ void main() { 'settings', () { late DockerContainer container; - late TestNextcloudClient client; + late NextcloudClient client; setUp(() async { container = await getDockerContainer(); client = await getTestClient( diff --git a/packages/nextcloud/test/spreed_test.dart b/packages/nextcloud/test/spreed_test.dart index bbc7f5e2..3000ee93 100644 --- a/packages/nextcloud/test/spreed_test.dart +++ b/packages/nextcloud/test/spreed_test.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'package:built_value/json_object.dart'; import 'package:nextcloud/core.dart' as core; +import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/spreed.dart' as spreed; import 'package:test/test.dart'; @@ -13,7 +14,7 @@ void main() { 'spreed', () { late DockerContainer container; - late TestNextcloudClient client1; + late NextcloudClient client1; setUp(() async { container = await getDockerContainer(); client1 = await getTestClient(container); diff --git a/packages/nextcloud/test/uppush_test.dart b/packages/nextcloud/test/uppush_test.dart index 2ecd3e7f..b48dcc5c 100644 --- a/packages/nextcloud/test/uppush_test.dart +++ b/packages/nextcloud/test/uppush_test.dart @@ -1,3 +1,4 @@ +import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/uppush.dart'; import 'package:test/test.dart'; @@ -8,7 +9,7 @@ void main() { 'uppush', () { late DockerContainer container; - late TestNextcloudClient client; + late NextcloudClient client; setUp(() async { container = await getDockerContainer(); client = await getTestClient( diff --git a/packages/nextcloud/test/user_status_test.dart b/packages/nextcloud/test/user_status_test.dart index b53905f9..395665e0 100644 --- a/packages/nextcloud/test/user_status_test.dart +++ b/packages/nextcloud/test/user_status_test.dart @@ -1,3 +1,4 @@ +import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/user_status.dart' as user_status; import 'package:test/test.dart'; @@ -8,7 +9,7 @@ void main() { 'user_status', () { late DockerContainer container; - late TestNextcloudClient client; + late NextcloudClient client; setUp(() async { container = await getDockerContainer(); client = await getTestClient(container); diff --git a/packages/nextcloud/test/webdav_test.dart b/packages/nextcloud/test/webdav_test.dart index b5f030b0..a7c9781e 100644 --- a/packages/nextcloud/test/webdav_test.dart +++ b/packages/nextcloud/test/webdav_test.dart @@ -139,7 +139,7 @@ void main() { 'webdav', () { late DockerContainer container; - late TestNextcloudClient client; + late NextcloudClient client; setUp(() async { container = await getDockerContainer();