예제 #1
0
        public void CalculatesMonthlyRenumeration()
        {
            // Arrange
            IEmployee        salariedEmployee = new HourlyEmployee();
            IEmployeeVisitor visitor          = new CalculateRenumeration();

            // Act
            var result = salariedEmployee.Accept(visitor);

            // Assert
            Assert.AreEqual("renumeration", result);
        }
예제 #2
0
        public void CalculatesHourly()
        {
            // Arrange
            IEmployee        salariedEmployee = new HourlyEmployee();
            IEmployeeVisitor visitor          = new CalculateRate();

            // Act
            var result = salariedEmployee.Accept(visitor);

            // Assert
            Assert.AreEqual("rate", result);
        }