public override void Dispose()
        {
            base.Dispose();

            _urlHelper       = null;
            _httpClientMock  = null;
            _deserializer    = null;
            _sortOwner       = null;
            _repositoryOwner = null;
        }
 /// <summary>
 /// Default constructor used by Testing
 /// </summary>
 public OwnerService()
 {
     _logger            = new Logger <OwnerService>(new LoggerFactory());
     _urlHelper         = new URLHelper(@"http://agl-developer-test.azurewebsites.net");
     _httpClient        = new HttpClientHelper();
     _deserializerOwner = new DeserializerJson <Owner>();
     _repositoryOwner   = new OwnerRepository <Owner>(_urlHelper,
                                                      _httpClient,
                                                      _deserializerOwner);
     _sortOwner = new LinqSorterOwner();
 }
        async Task LinqSorterPetTestsAsync()
        {
            _urlHelper      = base.MoqURLHelper();
            _httpClientMock = await base.MockHttpClient();

            _deserializer = base.MoqDeserializerOwner();
            _sortOwner    = new LinqSorterOwner();

            _repositoryOwner = new OwnerRepository <Owner>(_urlHelper.Object,
                                                           _httpClientMock,
                                                           _deserializer.Object);
        }
Beispiel #4
0
        async Task OwnerServiceTestsAsync()
        {
            _loggerMock     = new Mock <ILogger <OwnerService> >();
            _urlHelper      = base.MoqURLHelper();
            _httpClientMock = await base.MockHttpClient();

            _deserializer = base.MoqDeserializerOwner();
            _sortOwner    = new LinqSorterOwner();

            _repositoryOwner = new OwnerRepository <Owner>(_urlHelper.Object,
                                                           _httpClientMock,
                                                           _deserializer.Object);
        }
 public OwnerService(ILogger <OwnerService> logger,
                     IURLHelper urlHelper,
                     IHttpClient httpClient,
                     IDeserializer <Owner> deserializer,
                     IOwnerRepository <Owner> repositoryOwner,
                     ILinqSorterOwner linqSorter)
 {
     _logger            = logger;
     _urlHelper         = urlHelper;
     _httpClient        = httpClient;
     _deserializerOwner = deserializer;
     _repositoryOwner   = new OwnerRepository <Owner>(_urlHelper,
                                                      _httpClient,
                                                      _deserializerOwner);
     _sortOwner = linqSorter;
 }