-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set min SDK version to 2.12 prerelease * Migrate cqrs to null-safety * Bump version to 5.0.0 and add changelog note * Remove meta from pubspec * Use null-safety mockito and test * Bump min SDK version * Remove deprecated success parameter from CommandResult Resolves #14. * Add generated mocks and fix tests * Push cqrs code coverage to 100% * Bump http to null-safe version * Fix http mocks * Fix http version to ^
- Loading branch information
Showing
9 changed files
with
161 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
name: cqrs | ||
version: 4.1.1 | ||
homepage: https://github.com/leancodepl/flutter_corelibrary/tree/master/packages/cqrs | ||
repository: https://github.com/leancodepl/flutter_corelibrary | ||
description: >- | ||
A library for convenient communication with CQRS-compatible backends, using | ||
queries and commands. | ||
environment: | ||
sdk: '>=2.10.0 <3.0.0' | ||
|
||
dependencies: | ||
http: ^0.12.2 | ||
meta: ^1.2.3 | ||
|
||
dev_dependencies: | ||
lint: ^1.3.0 | ||
mockito: ^4.1.2 | ||
test: ^1.15.4 | ||
test_coverage: ^0.5.0 | ||
name: cqrs | ||
version: 5.0.0-nullsafety.0 | ||
homepage: https://github.com/leancodepl/flutter_corelibrary/tree/master/packages/cqrs | ||
repository: https://github.com/leancodepl/flutter_corelibrary | ||
description: >- | ||
A library for convenient communication with CQRS-compatible backends, using | ||
queries and commands. | ||
environment: | ||
sdk: '>=2.12.0-0 <3.0.0' | ||
|
||
dependencies: | ||
http: ^0.13.0-nullsafety.0 | ||
|
||
dev_dependencies: | ||
build_runner: ^1.10.13 | ||
lint: ^1.5.1 | ||
mockito: ^5.0.0-nullsafety.4 | ||
test: ^1.16.0-nullsafety.13 | ||
test_coverage: ^0.5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
// Mocks generated by Mockito 5.0.0-nullsafety.7 from annotations | ||
// in cqrs/test/cqrs_test.dart. | ||
// Do not manually edit this file. | ||
|
||
import 'dart:async' as _i6; | ||
import 'dart:convert' as _i7; | ||
import 'dart:typed_data' as _i3; | ||
|
||
import 'package:http/src/base_request.dart' as _i8; | ||
import 'package:http/src/client.dart' as _i5; | ||
import 'package:http/src/response.dart' as _i2; | ||
import 'package:http/src/streamed_response.dart' as _i4; | ||
import 'package:mockito/mockito.dart' as _i1; | ||
|
||
// ignore_for_file: comment_references | ||
// ignore_for_file: unnecessary_parenthesis | ||
|
||
class _FakeResponse extends _i1.Fake implements _i2.Response {} | ||
|
||
class _FakeUint8List extends _i1.Fake implements _i3.Uint8List {} | ||
|
||
class _FakeStreamedResponse extends _i1.Fake implements _i4.StreamedResponse {} | ||
|
||
/// A class which mocks [Client]. | ||
/// | ||
/// See the documentation for Mockito's code generation for more information. | ||
class MockClient extends _i1.Mock implements _i5.Client { | ||
MockClient() { | ||
_i1.throwOnMissingStub(this); | ||
} | ||
|
||
@override | ||
_i6.Future<_i2.Response> head(Uri? url, {Map<String, String>? headers}) => | ||
(super.noSuchMethod(Invocation.method(#head, [url], {#headers: headers}), | ||
returnValue: Future.value(_FakeResponse())) | ||
as _i6.Future<_i2.Response>); | ||
@override | ||
_i6.Future<_i2.Response> get(Uri? url, {Map<String, String>? headers}) => | ||
(super.noSuchMethod(Invocation.method(#get, [url], {#headers: headers}), | ||
returnValue: Future.value(_FakeResponse())) | ||
as _i6.Future<_i2.Response>); | ||
@override | ||
_i6.Future<_i2.Response> post(Uri? url, | ||
{Map<String, String>? headers, | ||
Object? body, | ||
_i7.Encoding? encoding}) => | ||
(super.noSuchMethod( | ||
Invocation.method(#post, [url], | ||
{#headers: headers, #body: body, #encoding: encoding}), | ||
returnValue: Future.value(_FakeResponse())) | ||
as _i6.Future<_i2.Response>); | ||
@override | ||
_i6.Future<_i2.Response> put(Uri? url, | ||
{Map<String, String>? headers, | ||
Object? body, | ||
_i7.Encoding? encoding}) => | ||
(super.noSuchMethod( | ||
Invocation.method(#put, [url], | ||
{#headers: headers, #body: body, #encoding: encoding}), | ||
returnValue: Future.value(_FakeResponse())) | ||
as _i6.Future<_i2.Response>); | ||
@override | ||
_i6.Future<_i2.Response> patch(Uri? url, | ||
{Map<String, String>? headers, | ||
Object? body, | ||
_i7.Encoding? encoding}) => | ||
(super.noSuchMethod( | ||
Invocation.method(#patch, [url], | ||
{#headers: headers, #body: body, #encoding: encoding}), | ||
returnValue: Future.value(_FakeResponse())) | ||
as _i6.Future<_i2.Response>); | ||
@override | ||
_i6.Future<_i2.Response> delete(Uri? url, | ||
{Map<String, String>? headers, | ||
Object? body, | ||
_i7.Encoding? encoding}) => | ||
(super.noSuchMethod( | ||
Invocation.method(#delete, [url], | ||
{#headers: headers, #body: body, #encoding: encoding}), | ||
returnValue: Future.value(_FakeResponse())) | ||
as _i6.Future<_i2.Response>); | ||
@override | ||
_i6.Future<String> read(Uri? url, {Map<String, String>? headers}) => | ||
(super.noSuchMethod(Invocation.method(#read, [url], {#headers: headers}), | ||
returnValue: Future.value('')) as _i6.Future<String>); | ||
@override | ||
_i6.Future<_i3.Uint8List> readBytes(Uri? url, | ||
{Map<String, String>? headers}) => | ||
(super.noSuchMethod( | ||
Invocation.method(#readBytes, [url], {#headers: headers}), | ||
returnValue: Future.value(_FakeUint8List())) | ||
as _i6.Future<_i3.Uint8List>); | ||
@override | ||
_i6.Future<_i4.StreamedResponse> send(_i8.BaseRequest? request) => | ||
(super.noSuchMethod(Invocation.method(#send, [request]), | ||
returnValue: Future.value(_FakeStreamedResponse())) | ||
as _i6.Future<_i4.StreamedResponse>); | ||
} |