public void GetBreeds_Returns_EmptyList_When_No_Data_Returned()
        {
            // arrange
            var stubJsonSerializerWrapper = MockRepository.GenerateMock<IDataContractJsonSerializerWrapper>();
            stubJsonSerializerWrapper.Stub(x => x.ReadObject(Arg<Stream>.Is.Anything, Arg<DataContractJsonSerializer>.Is.Anything)).Return(null);

            var searchRepository = new SearchAPIFacade(stubJsonSerializerWrapper, _exceptionHandler, _configMgr,
                _webAPIRequestWrapper, _responseStreamHelper);

            // act
            var result = searchRepository.GetBreeds().ToList();

            // assert
            Assert.That(result.Count == 0);
        }
        public void GetBreeds_Returns_List_Breeds()
        {
            // arrange
            var stubJsonSerializerWrapper = MockRepository.GenerateMock<IDataContractJsonSerializerWrapper>();
            stubJsonSerializerWrapper.Stub(x => x.ReadObject(Arg<Stream>.Is.Anything, Arg<DataContractJsonSerializer>.Is.Anything)).Return(_breedsList);

            var searchRepository = new SearchAPIFacade(stubJsonSerializerWrapper, _exceptionHandler, _configMgr,
                _webAPIRequestWrapper, _responseStreamHelper);

            // act
            var result = searchRepository.GetBreeds().ToList();

            // assert
            Assert.That(result.First().Id == 1 && result.First().Name == "Dalmatian");
            Assert.That(result.Count == _breedsList.Count);
        }
        public void GetDogs_With_Breed_Returns_PageableResult_Dogs()
        {
            // arrange
            var stubJsonSerializerWrapper = MockRepository.GenerateMock<IDataContractJsonSerializerWrapper>();
            stubJsonSerializerWrapper.Stub(x => x.ReadObject(Arg<Stream>.Is.Anything, Arg<DataContractJsonSerializer>.Is.Anything)).Return(
                new PageableResults<Dog>() { Data = _dogsList });

            var searchRepository = new SearchAPIFacade(stubJsonSerializerWrapper, _exceptionHandler, _configMgr,
                _webAPIRequestWrapper, _responseStreamHelper);

            // act
            var result = searchRepository.GetDogsByBreed(1, 20, 4, "dalmatian");

            // assert
            Assert.That(result.Data.Count() == _dogsList.Count);
        }