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);
        }
Exemplo n.º 2
0
        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);
        }
        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);
        }
Exemplo n.º 4
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);
        }