From 601a5e6210c189c47920ae6f05e31fb347db322c Mon Sep 17 00:00:00 2001 From: Patrick Stewart Date: Mon, 11 Nov 2024 12:49:32 -0700 Subject: [PATCH] refactored: refactored mocking, exception to testing, support packages --- packages/core/lib/core.dart | 2 +- packages/core/lib/src/core/driver.dart | 2 +- packages/core/lib/src/core/map_service.dart | 2 +- packages/core/lib/src/core/metadata.dart | 2 +- packages/core/lib/src/core/server.dart | 2 +- packages/core/lib/src/core/service.dart | 2 +- .../lib/src/http2/http2_request_context.dart | 2 +- .../core/lib/src/http2/protevus_http2.dart | 2 +- packages/core/pubspec.lock | 28 +++++++++---------- packages/core/pubspec.yaml | 4 +-- packages/core/test/accepts_test.dart | 2 +- packages/core/test/body_test.dart | 2 +- packages/core/test/controller_test.dart | 2 +- packages/core/test/detach_test.dart | 2 +- packages/core/test/di_test.dart | 2 +- packages/core/test/encoders_buffer_test.dart | 2 +- packages/core/test/extension_test.dart | 2 +- packages/core/test/jsonp_test.dart | 2 +- packages/core/test/parameter_meta_test.dart | 2 +- packages/core/test/precontained_test.dart | 2 +- packages/core/test/primitives_test.dart | 2 +- packages/core/test/repeat_request_test.dart | 2 +- packages/core/test/server_test.dart | 2 +- packages/core/test/streaming_test.dart | 2 +- 24 files changed, 38 insertions(+), 38 deletions(-) diff --git a/packages/core/lib/core.dart b/packages/core/lib/core.dart index eda6d0e..83bb2f8 100644 --- a/packages/core/lib/core.dart +++ b/packages/core/lib/core.dart @@ -1,7 +1,7 @@ /// An easily-extensible web server framework in Dart. library platform_core; -export 'package:platform_exceptions/http_exception.dart'; +export 'package:platform_support/exceptions.dart'; export 'package:platform_model/model.dart'; export 'package:platform_route/route.dart'; export 'src/core/core.dart'; diff --git a/packages/core/lib/src/core/driver.dart b/packages/core/lib/src/core/driver.dart index 3e17d55..4c262de 100644 --- a/packages/core/lib/src/core/driver.dart +++ b/packages/core/lib/src/core/driver.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io' show Cookie; -import 'package:platform_exceptions/http_exception.dart'; +import 'package:platform_support/exceptions.dart'; import 'package:platform_route/route.dart'; import 'package:belatuk_combinator/belatuk_combinator.dart'; import 'package:stack_trace/stack_trace.dart'; diff --git a/packages/core/lib/src/core/map_service.dart b/packages/core/lib/src/core/map_service.dart index 417af78..2e018b3 100644 --- a/packages/core/lib/src/core/map_service.dart +++ b/packages/core/lib/src/core/map_service.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:platform_exceptions/http_exception.dart'; +import 'package:platform_support/exceptions.dart'; import 'service.dart'; diff --git a/packages/core/lib/src/core/metadata.dart b/packages/core/lib/src/core/metadata.dart index 90fd360..3ad4d11 100644 --- a/packages/core/lib/src/core/metadata.dart +++ b/packages/core/lib/src/core/metadata.dart @@ -1,6 +1,6 @@ library angel_framework.http.metadata; -import 'package:platform_exceptions/http_exception.dart'; +import 'package:platform_support/exceptions.dart'; import 'hooked_service.dart' show HookedServiceEventListener; import 'request_context.dart'; diff --git a/packages/core/lib/src/core/server.dart b/packages/core/lib/src/core/server.dart index 27b0c0d..37c682c 100644 --- a/packages/core/lib/src/core/server.dart +++ b/packages/core/lib/src/core/server.dart @@ -4,7 +4,7 @@ import 'dart:async'; import 'dart:collection' show HashMap; import 'dart:convert'; import 'package:platform_container/container.dart'; -import 'package:platform_exceptions/http_exception.dart'; +import 'package:platform_support/exceptions.dart'; import 'package:platform_route/route.dart'; import 'package:belatuk_combinator/belatuk_combinator.dart'; import 'package:http_parser/http_parser.dart'; diff --git a/packages/core/lib/src/core/service.dart b/packages/core/lib/src/core/service.dart index 5259a40..894c96e 100644 --- a/packages/core/lib/src/core/service.dart +++ b/packages/core/lib/src/core/service.dart @@ -1,7 +1,7 @@ library platform_core.http.service; import 'dart:async'; -import 'package:platform_exceptions/http_exception.dart'; +import 'package:platform_support/exceptions.dart'; import 'package:belatuk_merge_map/belatuk_merge_map.dart'; import 'package:quiver/core.dart'; import '../util.dart'; diff --git a/packages/core/lib/src/http2/http2_request_context.dart b/packages/core/lib/src/http2/http2_request_context.dart index f66f549..8f38a3d 100644 --- a/packages/core/lib/src/http2/http2_request_context.dart +++ b/packages/core/lib/src/http2/http2_request_context.dart @@ -5,7 +5,7 @@ import 'package:platform_container/container.dart'; import 'package:platform_core/core.dart'; import 'package:collection/collection.dart' show IterableExtension; import 'package:http2/transport.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:uuid/uuid.dart'; final RegExp _comma = RegExp(r',\s*'); diff --git a/packages/core/lib/src/http2/protevus_http2.dart b/packages/core/lib/src/http2/protevus_http2.dart index 7f1a1b7..cd12b59 100644 --- a/packages/core/lib/src/http2/protevus_http2.dart +++ b/packages/core/lib/src/http2/protevus_http2.dart @@ -4,7 +4,7 @@ import 'dart:io'; import 'package:platform_core/core.dart' hide Header; import 'package:platform_core/http.dart'; import 'package:http2/transport.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'http2_request_context.dart'; import 'http2_response_context.dart'; import 'package:uuid/uuid.dart'; diff --git a/packages/core/pubspec.lock b/packages/core/pubspec.lock index c5080e9..991a8bf 100644 --- a/packages/core/pubspec.lock +++ b/packages/core/pubspec.lock @@ -389,20 +389,6 @@ packages: relative: true source: path version: "9.0.0" - platform_exceptions: - dependency: "direct main" - description: - path: "../exceptions" - relative: true - source: path - version: "9.0.0" - platform_mocking: - dependency: "direct main" - description: - path: "../mocking" - relative: true - source: path - version: "9.0.0" platform_model: dependency: "direct main" description: @@ -417,6 +403,20 @@ packages: relative: true source: path version: "9.0.0" + platform_support: + dependency: "direct main" + description: + path: "../support" + relative: true + source: path + version: "9.0.0" + platform_testing: + dependency: "direct main" + description: + path: "../testing" + relative: true + source: path + version: "9.0.0" pool: dependency: transitive description: diff --git a/packages/core/pubspec.yaml b/packages/core/pubspec.yaml index 33a67de..2f57930 100644 --- a/packages/core/pubspec.yaml +++ b/packages/core/pubspec.yaml @@ -8,10 +8,10 @@ environment: sdk: '>=3.3.0 <4.0.0' dependencies: platform_container: ^9.0.0 - platform_exceptions: ^9.0.0 platform_model: ^9.0.0 platform_route: ^9.0.0 - platform_mocking: ^9.0.0 + platform_support: ^9.0.0 + platform_testing: ^9.0.0 belatuk_merge_map: ^5.1.0 belatuk_combinator: ^5.2.0 belatuk_http_server: ^4.4.0 diff --git a/packages/core/test/accepts_test.dart b/packages/core/test/accepts_test.dart index 40bb45a..dcf6fed 100644 --- a/packages/core/test/accepts_test.dart +++ b/packages/core/test/accepts_test.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:platform_container/mirrors.dart'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; final Uri endpoint = Uri.parse('http://example.com/accept'); diff --git a/packages/core/test/body_test.dart b/packages/core/test/body_test.dart index 386dc5e..f57e0a9 100644 --- a/packages/core/test/body_test.dart +++ b/packages/core/test/body_test.dart @@ -3,7 +3,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/core/test/controller_test.dart b/packages/core/test/controller_test.dart index 7f2dcc7..d8aa584 100644 --- a/packages/core/test/controller_test.dart +++ b/packages/core/test/controller_test.dart @@ -6,7 +6,7 @@ import 'package:platform_container/mirrors.dart'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; import 'package:http/http.dart' as http; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; import 'common.dart'; diff --git a/packages/core/test/detach_test.dart b/packages/core/test/detach_test.dart index af315b4..fe2c696 100644 --- a/packages/core/test/detach_test.dart +++ b/packages/core/test/detach_test.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/core/test/di_test.dart b/packages/core/test/di_test.dart index 0695434..651a232 100644 --- a/packages/core/test/di_test.dart +++ b/packages/core/test/di_test.dart @@ -6,7 +6,7 @@ import 'package:platform_core/http.dart'; import 'package:platform_container/mirrors.dart'; import 'package:platform_core/core.dart'; import 'package:http/http.dart' as http; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; import 'common.dart'; diff --git a/packages/core/test/encoders_buffer_test.dart b/packages/core/test/encoders_buffer_test.dart index 14afaa8..b39078d 100644 --- a/packages/core/test/encoders_buffer_test.dart +++ b/packages/core/test/encoders_buffer_test.dart @@ -6,7 +6,7 @@ import 'dart:typed_data' show BytesBuilder; import 'package:platform_container/mirrors.dart'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; Future> getBody(MockHttpResponse rs) async { diff --git a/packages/core/test/extension_test.dart b/packages/core/test/extension_test.dart index d139766..0e077a3 100644 --- a/packages/core/test/extension_test.dart +++ b/packages/core/test/extension_test.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:platform_container/mirrors.dart'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; final Uri endpoint = Uri.parse('http://example.com'); diff --git a/packages/core/test/jsonp_test.dart b/packages/core/test/jsonp_test.dart index 47ac418..3b67add 100644 --- a/packages/core/test/jsonp_test.dart +++ b/packages/core/test/jsonp_test.dart @@ -3,7 +3,7 @@ import 'dart:convert'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; import 'package:http_parser/http_parser.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/core/test/parameter_meta_test.dart b/packages/core/test/parameter_meta_test.dart index dd50d2f..a0b01ae 100644 --- a/packages/core/test/parameter_meta_test.dart +++ b/packages/core/test/parameter_meta_test.dart @@ -4,7 +4,7 @@ import 'dart:convert'; import 'package:platform_container/mirrors.dart'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:logging/logging.dart'; import 'package:test/test.dart'; diff --git a/packages/core/test/precontained_test.dart b/packages/core/test/precontained_test.dart index 92eadad..fa6d015 100644 --- a/packages/core/test/precontained_test.dart +++ b/packages/core/test/precontained_test.dart @@ -3,7 +3,7 @@ import 'dart:convert'; import 'package:platform_container/mirrors.dart'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; diff --git a/packages/core/test/primitives_test.dart b/packages/core/test/primitives_test.dart index 7968c28..f0f2288 100644 --- a/packages/core/test/primitives_test.dart +++ b/packages/core/test/primitives_test.dart @@ -4,7 +4,7 @@ import 'dart:io' show stderr; import 'package:platform_container/mirrors.dart'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; diff --git a/packages/core/test/repeat_request_test.dart b/packages/core/test/repeat_request_test.dart index ab0d994..b6d09e3 100644 --- a/packages/core/test/repeat_request_test.dart +++ b/packages/core/test/repeat_request_test.dart @@ -4,7 +4,7 @@ import 'dart:convert'; import 'package:platform_container/mirrors.dart'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/core/test/server_test.dart b/packages/core/test/server_test.dart index b01090b..236d5f0 100644 --- a/packages/core/test/server_test.dart +++ b/packages/core/test/server_test.dart @@ -5,7 +5,7 @@ import 'dart:io'; import 'package:platform_container/mirrors.dart'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; diff --git a/packages/core/test/streaming_test.dart b/packages/core/test/streaming_test.dart index 6d25457..ffd9b5a 100644 --- a/packages/core/test/streaming_test.dart +++ b/packages/core/test/streaming_test.dart @@ -6,7 +6,7 @@ import 'package:platform_container/mirrors.dart'; import 'package:platform_core/core.dart'; import 'package:platform_core/http.dart'; import 'package:logging/logging.dart'; -import 'package:platform_mocking/mocking.dart'; +import 'package:platform_testing/http.dart'; import 'package:test/test.dart';