Пример #1
0
        public void MustReturnAllocationsTotalCost()
        {
            var employee   = new Employee();
            var project    = new Project();
            var allocation = new Allocation(project, employee);

            employee.WorkHourlyCost  = 16;
            allocation.DailyWorkLoad = 8;
            allocation.StartDate     = new DateTime(2019, 2, 11);
            allocation.EndDate       = new DateTime(2019, 2, 18);

            var expectedValue = 768; // allocation.TotalDays() * employee.WorkHourlyCost * (decimal) allocation.DailyWorkLoad;
            var actualValue   = allocation.AllocationTotalCost();

            Assert.Equal(expectedValue, actualValue);
        }