Exemplo n.º 1
0
        public Budget CreateBudgetFromTemplate(BudgetTemplate template, DateTime startDate)
        {
            Budget newBudget = _factory.CreateBudget(template, startDate);

            _budgetRepository.Persist(newBudget);
            return(newBudget);
        }
Exemplo n.º 2
0
        public void Create_Budget_Should_Create_Budget_Using_Factory()
        {
            var someTemplate = new BudgetTemplate();
            var someDate     = DateTime.Today;

            _sut.CreateBudgetFromTemplate(someTemplate, someDate);

            A.CallTo(() => _budgetFactory.CreateBudget(someTemplate, someDate))
            .MustHaveHappened();
        }