mniak / bc108
Showing 2 of 3 files from the diff.

@@ -1,5 +1,6 @@
Loading
1 1
import '../fields/field.dart';
2 2
import '../fields/field_result.dart';
3 +
import 'exceptions.dart';
3 4
4 5
class CompositeField<T> implements Field<List<T>> {
5 6
  Iterable<Field> _fields;
@@ -17,8 +18,8 @@
Loading
17 18
18 19
  String serialize(Iterable<T> values) {
19 20
    if (values.length != _fields.length)
20 -
      throw ArgumentError.value(values, 'values',
21 -
          'Values must be the same length as the fields provided in the constructor.');
21 +
      throw FieldSerializeException(
22 +
          'The number of values must be the same the number of fields provided in the constructor.');
22 23
23 24
    final itf = _fields.iterator;
24 25
    final itv = values.iterator;

@@ -15,3 +15,14 @@
Loading
15 15
    return "FieldParseException: $message";
16 16
  }
17 17
}
18 +
19 +
class FieldSerializeException implements FieldException {
20 +
  String message;
21 +
  FieldSerializeException(String reason) {
22 +
    this.message = reason;
23 +
  }
24 +
25 +
  String toString() {
26 +
    return "FieldSerializeException: $message";
27 +
  }
28 +
}
Files Coverage
lib/src 74.38%
Project Totals (34 files) 74.38%
Untitled

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading