public PrintJobViewModel(ISettingsManager settingsManager, IJobInfoQueue jobInfoQueue, PrintJobViewModelTranslation translation, DragAndDropEventHandler dragAndDrop, IInteractionInvoker interactionInvoker, IUserGuideHelper userGuideHelper, ApplicationNameProvider applicationNameProvider, IDispatcher dispatcher) { Title = applicationNameProvider.ApplicationName; _dispatcher = dispatcher; _dragAndDrop = dragAndDrop; _interactionInvoker = interactionInvoker; _userGuideHelper = userGuideHelper; _settingsManager = settingsManager; _jobInfoQueue = jobInfoQueue; _jobInfoQueue.OnNewJobInfo += OnNewJobInfo; _settingsProvider = settingsManager.GetSettingsProvider(); SaveCommand = new DelegateCommand(ExecuteSave); EmailCommand = new DelegateCommand(ExecuteMail); ManagePrintJobsCommand = new DelegateCommand(ExecuteManagePrintJobs); ShowSettingsCommand = new DelegateCommand(ExecuteShowSettings); WindowClosingCommand = new DelegateCommand(OnWindowClosing); DragEnterCommand = new DelegateCommand <DragEventArgs>(OnDragEnter); DropCommand = new DelegateCommand <DragEventArgs>(OnDrop); KeyDownCommand = new DelegateCommand <KeyEventArgs>(OnKeyDown); Translation = translation; }
public void ViewModelWithOneJobs_PendingJobsText_IsCorrect() { var queueStub = MockRepository.GenerateStub <IJobInfoQueue>(); queueStub.Stub(x => x.Count).Return(2); var translation = new PrintJobViewModelTranslation(); var printJobViewModel = CreateSomePrintJobViewModelWithQueue(queueStub); Assert.AreEqual(translation.FormatMoreJobsWaiting(1), printJobViewModel.PendingJobsText); }