LCOV - code coverage report
Current view: top level - details - details_repository.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 1 3 33.3 %
Date: 2019-10-16 20:04:22 Functions: 0 0 -

          Line data    Source code
       1             : /// [DetailsRepository] allows to retrieve an item based on its id.
       2             : ///
       3             : /// [T] - the element type.
       4             : /// [I] - the element's id type.
       5             : abstract class DetailsRepository<T, I> {
       6             :   /// Retrieves an element with given id. When there's no element matching the
       7             :   /// given [id] null should be returned or [ElementNotFoundException] should
       8             :   /// be thrown.
       9             :   Future<T> getById(I id);
      10             : }
      11             : 
      12             : /// Exception indicating that element with [id] was not found in the
      13             : /// repository.
      14             : class ElementNotFoundException<I> implements Exception {
      15             :   final I id;
      16             : 
      17           1 :   ElementNotFoundException(this.id);
      18             : 
      19           0 :   @override
      20           0 :   String toString() => '$runtimeType: Unable to find element with id $id.';
      21             : }

Generated by: LCOV version 1.14