Example #1
0
        public void RunTransactions()
        {
            MockTransaction transaction = new MockTransaction();

            presenter.TransactionContainer.Add(transaction);
            Employee employee =
                new Employee(123, "John", "123 Baker St.");

            PayrollDatabase.AddEmployee_Static(employee);

            presenter.RunTransactions();

            Assert.IsTrue(transaction.wasExecuted);
            Assert.AreEqual("", view.transactionsText);
            string expectedEmployeeTest = employee.ToString()
                                          + Environment.NewLine;

            Assert.AreEqual(expectedEmployeeTest, view.employeesText);
        }