private void AddJournalToInternalCollection(Journal journal)
        {
            var journalVM = new JournalViewModel(journal, _journalRepository, _accountRepository, false);
            journalVM.RequestDelete += DeleteJournal;

            _journalVMs.Add(journalVM);
        }
 private void OpenNewJournalScreen()
 {
     var newJournal = new Journal(DateTime.Today);
     var vm = new JournalViewModel(newJournal, _journalRepository, _accountRepository);
     AddVmToWorkSpacesAndDisplay(vm, null);
 }
 public void OpenExistingJournalScreen(Journal journal)
 {
     var vm = new JournalViewModel(journal, _journalRepository, _accountRepository);
     AddVmToWorkSpacesAndDisplay(vm, null);
     vm.RequestDelete += DeleteJournal;
 }
        private void SetUpValidJournalVM()
        {
            _date = new DateTime(2011, 1, 28);
            _journal = new Journal(_date, "Morrisons");

            var fromAccount = new Account(1, "Bank", AccountType.Asset);
            var toAccount = new Account(2, "Food", AccountType.Expense);
            _tran1 = new Transaction(_journal, TransactionDirection.In, amount: 123.45M, account: fromAccount);
            _tran2 = new Transaction(_journal, TransactionDirection.Out, amount: 123.45M, account: toAccount);

            _vm = new JournalViewModel(_journal, _mockJournalRepository, _mockAccountRepository);
            _vm.PropertyChanged += _changeCounter.HandlePropertyChange;
        }
        private void SetUpInValidJournalVM()
        {
            _date = new DateTime(2011, 1, 28);
            _journal = new Journal(_date, "Morrisons");
            _tran1 = new Transaction(_journal, TransactionDirection.In, amount: 123.45M);
            _tran2 = new Transaction(_journal, TransactionDirection.Out, amount: 543.21M);

            _vm = new JournalViewModel(_journal, _mockJournalRepository, _mockAccountRepository);
            _vm.PropertyChanged += _changeCounter.HandlePropertyChange;
        }