public AddNewDogViewModelTests() { _userList = _fixture.BuildUsersList(); _dogList = _fixture.BuildDogsList(); _mockNavigationService = new Mock <INavigationService>(); _mockPageDialogService = new Mock <IPageDialogService>(); _mockDogRepository = new Mock <IRepository <Dog> >(); _mockUserRepository = new Mock <IRepository <User> >(); _dogApiService = new DogApiService(); _mockAuthentification = new Mock <IAuthenticationService>(); _addNewDogViewModel = new AddNewDogViewModel(_mockNavigationService.Object, _dogApiService, _mockDogRepository.Object, _mockUserRepository.Object, _mockPageDialogService.Object, _mockAuthentification.Object); }
public AddNewDogViewModel(INavigationService navigationService, IDogApiService dogBreedsService, IRepository <Dog> dogRepository, IRepository <User> userRepository, IPageDialogService dialogService, IAuthenticationService authenticationService) : base(navigationService) { Title = UiText.ADD_NEW_DOG_PAGE_MAIN_TITLE; _dialogService = dialogService; _dogBreedsService = dogBreedsService; _DogBreeds = _dogBreedsService.GetDogBreeds(); _breedsList = _DogBreeds.message; _dogRepository = dogRepository; _userRepository = userRepository; _authenticationService = authenticationService; _name = new ValidatableObject <string>(); _price = new ValidatableObject <float>(); AddValidationRulesToValidatable(); }
/// <summary> /// Constructor de la clase que setea los servicios necesarios para elaborar las peticiones. /// </summary> public DogController(IDogApiService dogApiService, IDogService dogService) { _dogApiService = dogApiService; _dogService = dogService; }