public void Setup() { _carServiceMock = Substitute.For <ICarService>(); _carViewModelMapperMock = Substitute.For <ICarViewModelMapper>(); _rentalServiceMock = Substitute.For <IRentalService>(); _rentalViewModelMapperMock = Substitute.For <IRentalViewModelMapper>(); _messengerServiceMock = Substitute.For <IMessengerService>(); }
public DriverRentalsViewModel(IRentalService rentalService, IRentalViewModelMapper rentalViewModelMapper) { _rentalService = rentalService ?? throw new ArgumentNullException(); _rentalViewModelMapper = rentalViewModelMapper ?? throw new ArgumentNullException(); DriverRentals = new ObservableCollection <RentalViewModel>(); _driverRentalsCollection = new CollectionViewSource { Source = DriverRentals }; Messenger.Default.Register <RefreshRentalsMessage>(this, NewRentalAdded); ApplyFilters(); }
public RentalsManagementViewModel(IRentalService rentalService, IRentalViewModelMapper rentalViewModelMapper) { _rentalService = rentalService ?? throw new ArgumentNullException(); _rentalViewModelMapper = rentalViewModelMapper ?? throw new ArgumentNullException(); RentalsObservableCollection = new ObservableCollection <RentalViewModel>(); _rentalsCollection = new CollectionViewSource { Source = RentalsObservableCollection }; _rentalsCollection.Filter += FilterActiveRentals; RefreshRentalsCollection(); }
public void Setup() { _rentalServiceMock = Substitute.For <IRentalService>(); _rentalViewModelMapperMock = Substitute.For <IRentalViewModelMapper>(); }