LCOV - code coverage report
Current view: top level - register/model - register_repository.dart (source / functions) Hit Total Coverage
Test: SWE574 - Fall2023 - Group1 - Mobile Test Coverage Lines: 4 4 100.0 %
Date: 2023-12-31 10:28:05 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : import 'package:memories_app/network/network_manager.dart';
       2             : import 'package:memories_app/util/api_endpoints.dart';
       3             : import 'package:memories_app/routes/register/model/register_request_model.dart';
       4             : import 'package:memories_app/routes/register/model/register_response_model.dart';
       5             : 
       6             : abstract class RegisterRepository {
       7             :   Future<RegisterResponseModel> register(RegisterRequestModel model);
       8             : }
       9             : 
      10             : class RegisterRepositoryImp extends RegisterRepository {
      11             :   final NetworkManager _networkManager;
      12             : 
      13           1 :   RegisterRepositoryImp({NetworkManager? networkManager}) : _networkManager = networkManager ?? NetworkManager();
      14             : 
      15           1 :   @override
      16             :   Future<RegisterResponseModel> register(RegisterRequestModel model) async {
      17             :     final Result result =
      18           2 :         await _networkManager.post(ApiEndpoints.register, body: model);
      19           2 :     return RegisterResponseModel.fromJson(result.json);
      20             :   }
      21             : }

Generated by: LCOV version 1.14