Inheritance: ViewModelBase
        public StatementControllerFileOperations(
            [NotNull] IUiContext uiContext,
            [NotNull] IStatementFileManager statementFileManager,
            [NotNull] IRecentFileManager recentFileManager,
            [NotNull] DemoFileHelper demoFileHelper,
            [NotNull] IBudgetBucketRepository budgetBucketRepository)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException("uiContext");
            }

            if (statementFileManager == null)
            {
                throw new ArgumentNullException("statementFileManager");
            }

            if (recentFileManager == null)
            {
                throw new ArgumentNullException("recentFileManager");
            }

            if (demoFileHelper == null)
            {
                throw new ArgumentNullException("demoFileHelper");
            }

            if (budgetBucketRepository == null)
            {
                throw new ArgumentNullException("budgetBucketRepository");
            }

            this.uiContext = uiContext;
            this.statementFileManager = statementFileManager;
            this.recentFileManager = recentFileManager;
            this.demoFileHelper = demoFileHelper;
            this.recentFileCommands = new List<ICommand> { null, null, null, null, null };
            ViewModel = new StatementViewModel(budgetBucketRepository);
        }
        public StatementControllerFileOperations(
            [NotNull] IUiContext uiContext,
            [NotNull] LoadFileController loadFileController,
            [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

            if (loadFileController == null)
            {
                throw new ArgumentNullException(nameof(loadFileController));
            }

            if (applicationDatabaseService == null)
            {
                throw new ArgumentNullException(nameof(applicationDatabaseService));
            }

            this.messageBox = uiContext.UserPrompts.MessageBox;
            this.loadFileController = loadFileController;
            ViewModel = new StatementViewModel(uiContext, applicationDatabaseService);
        }
        public StatementControllerFileOperations(
            [NotNull] IUiContext uiContext,
            [NotNull] LoadFileController loadFileController,
            [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

            if (loadFileController == null)
            {
                throw new ArgumentNullException(nameof(loadFileController));
            }

            if (applicationDatabaseService == null)
            {
                throw new ArgumentNullException(nameof(applicationDatabaseService));
            }

            this.messageBox         = uiContext.UserPrompts.MessageBox;
            this.loadFileController = loadFileController;
            ViewModel = new StatementViewModel(uiContext, applicationDatabaseService);
        }
 private static Transaction GetPhoneTxnFromGroupedList(StatementViewModel subject)
 {
     Transaction transactionFromGroupedList = subject.GroupedByBucket.Single(g => g.Bucket == StatementModelTestData.PhoneBucket)
         .Transactions.Single(t => t.Date == new DateTime(2013, 07, 16));
     return transactionFromGroupedList;
 }
 private static Transaction GetPhoneTxnFromFullList(StatementViewModel subject)
 {
     Transaction transactionFromFullList = subject.Statement.Transactions
         .Single(t => t.BudgetBucket == StatementModelTestData.PhoneBucket && t.Date == new DateTime(2013, 07, 16));
     return transactionFromFullList;
 }
 public void GivenNoDataStatementNameShouldBeNoTransactionsLoaded()
 {
     var subject = new StatementViewModel(MockBucketRepo.Object);
     Assert.AreEqual("[No Transactions Loaded]", subject.StatementName);
 }
 public void GivenNoDataHasTransactionsShouldBeFalse()
 {
     var subject = new StatementViewModel(MockBucketRepo.Object);
     Assert.IsFalse(subject.HasTransactions);
 }