public void SetUp() { TransactionContainer.AddAction action = new TransactionContainer.AddAction(SillyAddAction); container = new TransactionContainer(action); transaction = new MockTransaction(); }
public void SetUp() { view = new MockAddEmployeeView(); container = new TransactionContainer(null); database = new InMemoryPayrollDatabase(); presenter = new AddEmployeePresenter( view, container, database); }
public AddEmployeePresenter(AddEmployeeView view, TransactionContainer container, IPayrollDatabase database) { this.view = view; this.transactionContainer = container; this.database = database; }
public PayrollPresenter(IPayrollDatabase database, ViewLoader viewLoader) { this.view = view; this.database = database; this.viewLoader = viewLoader; TransactionContainer.AddAction addAction = new TransactionContainer.AddAction(TransactionAdded); transactionContainer = new TransactionContainer(addAction); }
public void SetUp() { window = new AddEmployeeWindow(); transactionContainer = new TransactionContainer(null); presenter = new AddEmployeePresenter( window, transactionContainer, null); window.Presenter = presenter; window.Show(); }
public PayrollPresenter(PayrollDatabase database, ViewLoader viewLoader) { View = View; Database = database; this.viewLoader = viewLoader; TransactionContainer.AddAction addAction = TransactionAdded; TransactionContainer = new TransactionContainer(addAction); }
public void LoadAddEmployeeView( TransactionContainer transactionContainer) { AddEmployeeWindow view = new AddEmployeeWindow(); AddEmployeePresenter presenter = new AddEmployeePresenter(view, transactionContainer, database); view.Presenter = presenter; LoadView(view); }
public virtual void RunTransactions() { foreach (Transaction transaction in TransactionContainer.Transactions) { transaction.Execute(); } TransactionContainer.Clear(); UpdateTransactionsTextBox(); UpdateEmployeesTextBox(); }
public void AddAction() { TransactionContainer container = presenter.TransactionContainer; Transaction transaction = new MockTransaction(); container.Add(transaction); string expected = transaction.ToString() + Environment.NewLine; Assert.AreEqual(expected, view.transactionsText); }