Ejemplo n.º 1
0
        public void TestInitialise()
        {
            this.testData = new BudgetAnalyserStorageRoot
            {
                BudgetCollectionRootDto = new StorageBranch {
                    Source = "Budget.xml"
                },
                LedgerBookRootDto = new StorageBranch {
                    Source = "Ledger.xml"
                },
                MatchingRulesCollectionRootDto = new StorageBranch {
                    Source = "Rules.xml"
                },
                StatementModelRootDto = new StorageBranch {
                    Source = "Statement.xml"
                },
                LedgerReconciliationToDoCollection = new List <ToDoTaskDto>
                {
                    new ToDoTaskDto {
                        CanDelete = true, Description = "Foo1", SystemGenerated = false
                    },
                    new ToDoTaskDto {
                        CanDelete = false, Description = "Foo2", SystemGenerated = true
                    }
                }
            };

            var subject = new Mapper_BudgetAnalyserStorageRoot_ApplicationDatabase();

            this.result = subject.ToModel(this.testData);
        }
Ejemplo n.º 2
0
        public void TestInitialise()
        {
            var todoCollection = new ToDoCollection();

            todoCollection.Add(new ToDoTask("Foo1"));
            todoCollection.Add(new ToDoTask("Foo2", false, false));
            this.testData = new ApplicationDatabase();
            PrivateAccessor.SetProperty(this.testData, "BudgetCollectionStorageKey", "Budget.xml");
            PrivateAccessor.SetProperty(this.testData, "FileName", "C:\\Foo\\TestData.bax");
            PrivateAccessor.SetProperty(this.testData, "LedgerBookStorageKey", "Ledger.xml");
            PrivateAccessor.SetProperty(this.testData, "MatchingRulesCollectionStorageKey", "Rules.xml");
            PrivateAccessor.SetProperty(this.testData, "StatementModelStorageKey", "Statement.xml");
            PrivateAccessor.SetProperty(this.testData, "LedgerReconciliationToDoCollection", todoCollection);

            var subject = new Mapper_BudgetAnalyserStorageRoot_ApplicationDatabase();

            this.result = subject.ToDto(this.testData);
        }