Skip to content

Commit 580599f

Browse files
committed
Added readme + license to all packages
1 parent 674c560 commit 580599f

File tree

6 files changed

+330
-4
lines changed

6 files changed

+330
-4
lines changed

packages/flutter_parameterized_test/LICENSE

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Dutch Coding Company B.V.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/flutter_parameterized_test/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<!--
2+
This README describes the package. If you publish this package to pub.dev,
3+
this README's contents appear on the landing page for your package.
4+
5+
For information about how to write a good package README, see the guide for
6+
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
7+
8+
For general information about developing packages, see the Dart guide for
9+
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
10+
and the Flutter guide for
11+
[developing packages and plugins](https://flutter.dev/developing-packages).
12+
-->
13+
14+
# Parameterized test
15+
16+
Simple package that helps with executing parameterized tests. Inspired by [JUnit ParameterizedTest CsvValues](https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests-sources-CsvSource). This package is a wrapper around `groups` and `test`.
17+
18+
## Features
19+
20+
This package helps executing a test multiple times with different parameters.
21+
Currently parameters can be specified as:
22+
- ParameterizedSource.csv
23+
- ParameterizedSource.value
24+
- ParameterizedSource.values
25+
26+
When using `ParameterizedSource.csv` the library tries to parse the values to `int`, `double`, `bool` or `String?`. If the csv value contains a empty string it will be parsed to null.
27+
This parsing can be escaped by wrapping in the values in `'` or `"`.
28+
29+
For example:
30+
31+
|Input | Output|
32+
|------|-------|
33+
|`'banana, 4, apple'`|`'banana'`, `4`, `'apple'`|
34+
|`'banana, 4, '`|`'banana'`, `4`, `null`|
35+
|`'banana, "4", apple'`|`'banana'`, `'4'`, `'apple'`|
36+
|`'banana, 4, ""'`|`'banana'`, `4`, `''`|
37+
38+
## Getting started
39+
40+
Include `parameterized_test` or when using `flutter_test` include `flutter_parameterized_test` in
41+
your projects `pubspec.yaml`.
42+
43+
## Usage
44+
45+
Instead of using `groups` or `test` you can now use `parameterizedTest` and supply it with multiple test parameters.
46+
47+
Csv source example:
48+
```dart
49+
parameterizedTest(
50+
'Amount of letters',
51+
ParameterizedSource.csv([
52+
'kiwi, 4',
53+
'apple, 5',
54+
'banana, 6',
55+
]),
56+
(List<dynamic> values) {
57+
final String input = values[0];
58+
final expected = values[1];
59+
60+
final actual = input.length;
61+
62+
expect(actual, expected);
63+
},
64+
);
65+
```
66+
67+
Values source example:
68+
```dart
69+
parameterizedTest(
70+
'Amount of letters',
71+
ParameterizedSource.values([
72+
['kiwi', 4],
73+
['apple', 5],
74+
['banana', 6],
75+
]),
76+
(List<dynamic> values) {
77+
final String input = values[0];
78+
final expected = values[1];
79+
80+
final actual = input.length;
81+
82+
expect(actual, expected);
83+
},
84+
);
85+
```
86+
87+
## Additional information
88+
89+
Its just a simple wrapper to easily execute tests multiple times with different values. Feel free to leave some feedback or open an pull request :)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Dutch Coding Company B.V.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<!--
2+
This README describes the package. If you publish this package to pub.dev,
3+
this README's contents appear on the landing page for your package.
4+
5+
For information about how to write a good package README, see the guide for
6+
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
7+
8+
For general information about developing packages, see the Dart guide for
9+
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
10+
and the Flutter guide for
11+
[developing packages and plugins](https://flutter.dev/developing-packages).
12+
-->
13+
14+
# Parameterized test
15+
16+
Simple package that helps with executing parameterized tests. Inspired by [JUnit ParameterizedTest CsvValues](https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests-sources-CsvSource). This package is a wrapper around `groups` and `test`.
17+
18+
## Features
19+
20+
This package helps executing a test multiple times with different parameters.
21+
Currently parameters can be specified as:
22+
- ParameterizedSource.csv
23+
- ParameterizedSource.value
24+
- ParameterizedSource.values
25+
26+
When using `ParameterizedSource.csv` the library tries to parse the values to `int`, `double`, `bool` or `String?`. If the csv value contains a empty string it will be parsed to null.
27+
This parsing can be escaped by wrapping in the values in `'` or `"`.
28+
29+
For example:
30+
31+
|Input | Output|
32+
|------|-------|
33+
|`'banana, 4, apple'`|`'banana'`, `4`, `'apple'`|
34+
|`'banana, 4, '`|`'banana'`, `4`, `null`|
35+
|`'banana, "4", apple'`|`'banana'`, `'4'`, `'apple'`|
36+
|`'banana, 4, ""'`|`'banana'`, `4`, `''`|
37+
38+
## Getting started
39+
40+
Include `parameterized_test` or when using `flutter_test` include `flutter_parameterized_test` in
41+
your projects `pubspec.yaml`.
42+
43+
## Usage
44+
45+
Instead of using `groups` or `test` you can now use `parameterizedTest` and supply it with multiple test parameters.
46+
47+
Csv source example:
48+
```dart
49+
parameterizedTest(
50+
'Amount of letters',
51+
ParameterizedSource.csv([
52+
'kiwi, 4',
53+
'apple, 5',
54+
'banana, 6',
55+
]),
56+
(List<dynamic> values) {
57+
final String input = values[0];
58+
final expected = values[1];
59+
60+
final actual = input.length;
61+
62+
expect(actual, expected);
63+
},
64+
);
65+
```
66+
67+
Values source example:
68+
```dart
69+
parameterizedTest(
70+
'Amount of letters',
71+
ParameterizedSource.values([
72+
['kiwi', 4],
73+
['apple', 5],
74+
['banana', 6],
75+
]),
76+
(List<dynamic> values) {
77+
final String input = values[0];
78+
final expected = values[1];
79+
80+
final actual = input.length;
81+
82+
expect(actual, expected);
83+
},
84+
);
85+
```
86+
87+
## Additional information
88+
89+
Its just a simple wrapper to easily execute tests multiple times with different values. Feel free to leave some feedback or open an pull request :)

packages/parameterized_test/LICENSE

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Dutch Coding Company B.V.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/parameterized_test/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<!--
2+
This README describes the package. If you publish this package to pub.dev,
3+
this README's contents appear on the landing page for your package.
4+
5+
For information about how to write a good package README, see the guide for
6+
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
7+
8+
For general information about developing packages, see the Dart guide for
9+
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
10+
and the Flutter guide for
11+
[developing packages and plugins](https://flutter.dev/developing-packages).
12+
-->
13+
14+
# Parameterized test
15+
16+
Simple package that helps with executing parameterized tests. Inspired by [JUnit ParameterizedTest CsvValues](https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests-sources-CsvSource). This package is a wrapper around `groups` and `test`.
17+
18+
## Features
19+
20+
This package helps executing a test multiple times with different parameters.
21+
Currently parameters can be specified as:
22+
- ParameterizedSource.csv
23+
- ParameterizedSource.value
24+
- ParameterizedSource.values
25+
26+
When using `ParameterizedSource.csv` the library tries to parse the values to `int`, `double`, `bool` or `String?`. If the csv value contains a empty string it will be parsed to null.
27+
This parsing can be escaped by wrapping in the values in `'` or `"`.
28+
29+
For example:
30+
31+
|Input | Output|
32+
|------|-------|
33+
|`'banana, 4, apple'`|`'banana'`, `4`, `'apple'`|
34+
|`'banana, 4, '`|`'banana'`, `4`, `null`|
35+
|`'banana, "4", apple'`|`'banana'`, `'4'`, `'apple'`|
36+
|`'banana, 4, ""'`|`'banana'`, `4`, `''`|
37+
38+
## Getting started
39+
40+
Include `parameterized_test` or when using `flutter_test` include `flutter_parameterized_test` in
41+
your projects `pubspec.yaml`.
42+
43+
## Usage
44+
45+
Instead of using `groups` or `test` you can now use `parameterizedTest` and supply it with multiple test parameters.
46+
47+
Csv source example:
48+
```dart
49+
parameterizedTest(
50+
'Amount of letters',
51+
ParameterizedSource.csv([
52+
'kiwi, 4',
53+
'apple, 5',
54+
'banana, 6',
55+
]),
56+
(List<dynamic> values) {
57+
final String input = values[0];
58+
final expected = values[1];
59+
60+
final actual = input.length;
61+
62+
expect(actual, expected);
63+
},
64+
);
65+
```
66+
67+
Values source example:
68+
```dart
69+
parameterizedTest(
70+
'Amount of letters',
71+
ParameterizedSource.values([
72+
['kiwi', 4],
73+
['apple', 5],
74+
['banana', 6],
75+
]),
76+
(List<dynamic> values) {
77+
final String input = values[0];
78+
final expected = values[1];
79+
80+
final actual = input.length;
81+
82+
expect(actual, expected);
83+
},
84+
);
85+
```
86+
87+
## Additional information
88+
89+
Its just a simple wrapper to easily execute tests multiple times with different values. Feel free to leave some feedback or open an pull request :)

0 commit comments

Comments
 (0)