public void GoToAddTransaction_Transactiontype_CorrectPreparation(string typestring, TransactionType type)
        {
            Setup();
            // for navigation parsing
            Ioc.RegisterSingleton<IMvxStringToTypeParser>(new MvxStringToTypeParser());

            var dbHelper = new Mock<ISqliteConnectionCreator>().Object;
            var accountRepository = new AccountRepository(new AccountDataAccess(dbHelper));
            var transactionRepository = new TransactionRepository(new TransactionDataAccess(dbHelper),
                new RecurringTransactionDataAccess(dbHelper));
            var transactionManager = new TransactionManager(transactionRepository, accountRepository,
                new Mock<IDialogService>().Object);

            var defaultManager = new DefaultManager(accountRepository,
                new SettingDataAccess(new Mock<IRoamingSettings>().Object));

            var modifyTransactionViewModel =
                new ModifyTransactionViewModel(transactionRepository,
                    accountRepository,
                    new Mock<IDialogService>().Object,
                    transactionManager,
                    defaultManager);

            var modifyAccountViewModel = new ModifyAccountViewModel(accountRepository,
                new BalanceViewModel(accountRepository, new Mock<ITransactionRepository>().Object));

            var mainViewModel = new MainViewModel(modifyAccountViewModel, modifyTransactionViewModel,
                new BalanceViewModel(accountRepository, transactionRepository));

            mainViewModel.GoToAddTransactionCommand.Execute(typestring);

            Assert.False(modifyTransactionViewModel.IsEdit);
            Assert.True(modifyTransactionViewModel.IsEndless);
            if (type == TransactionType.Transfer)
            {
                Assert.True(modifyTransactionViewModel.IsTransfer);
            }
            else
            {
                Assert.False(modifyTransactionViewModel.IsTransfer);
            }
            Assert.Equal((int) type, modifyTransactionViewModel.SelectedTransaction.Type);
        }
        public void GoToAddPayment_PaymentType_CorrectPreparation(string typestring, PaymentType type)
        {
            Setup();
            // for navigation parsing
            Ioc.RegisterSingleton<IMvxStringToTypeParser>(new MvxStringToTypeParser());

            var dbHelper = new Mock<ISqliteConnectionCreator>().Object;
            var accountRepository = new AccountRepository(new AccountDataAccess(dbHelper));
            var paymentRepository = new PaymentRepository(new PaymentDataAccess(dbHelper),
                new RecurringPaymentDataAccess(dbHelper),
                accountRepository,
                new CategoryRepository(new CategoryDataAccess(dbHelper)));
            var paymentManager = new PaymentManager(paymentRepository, accountRepository,
                new Mock<IDialogService>().Object);

            var defaultManager = new DefaultManager(accountRepository,
                new SettingDataAccess(new Mock<IRoamingSettings>().Object));

            var modifyPaymentViewModel =
                new ModifyPaymentViewModel(paymentRepository,
                    accountRepository,
                    new Mock<IDialogService>().Object,
                    paymentManager,
                    defaultManager);

            var modifyAccountViewModel = new ModifyAccountViewModel(accountRepository);

            var mainViewModel = new MainViewModel(modifyAccountViewModel);

            mainViewModel.GoToAddPaymentCommand.Execute(typestring);

            Assert.False(modifyPaymentViewModel.IsEdit);
            Assert.True(modifyPaymentViewModel.IsEndless);
            if (type == PaymentType.Transfer)
            {
                Assert.True(modifyPaymentViewModel.IsTransfer);
            }
            else
            {
                Assert.False(modifyPaymentViewModel.IsTransfer);
            }
            Assert.Equal((int) type, modifyPaymentViewModel.SelectedPayment.Type);
        }