Exemplo n.º 1
0
        public void AllInfoIsCollected()
        {
            Assert.IsFalse(presenter.AllInformationIsCollected());
            presenter.EmpId = 1;
            Assert.IsFalse(presenter.AllInformationIsCollected());
            presenter.Name = "Bill";
            Assert.IsFalse(presenter.AllInformationIsCollected());
            presenter.Address = "123 abc";
            Assert.IsFalse(presenter.AllInformationIsCollected());
            presenter.IsHourly = true;
            Assert.IsFalse(presenter.AllInformationIsCollected());
            presenter.HourlyRate = 1.23;
            Assert.IsTrue(presenter.AllInformationIsCollected());

            presenter.IsHourly = false;
            Assert.IsFalse(presenter.AllInformationIsCollected());
            presenter.IsSalary = true;
            Assert.IsFalse(presenter.AllInformationIsCollected());
            presenter.Salary = 1234;
            Assert.IsTrue(presenter.AllInformationIsCollected());

            presenter.IsSalary = false;
            Assert.IsFalse(presenter.AllInformationIsCollected());
            presenter.IsCommission = true;
            Assert.IsFalse(presenter.AllInformationIsCollected());
            presenter.CommissionSalary = 123;
            Assert.IsFalse(presenter.AllInformationIsCollected());
            presenter.Commission = 12;
            Assert.IsTrue(presenter.AllInformationIsCollected());
        }