Beispiel #1
0
        public void Test1(int timesheetsInOffice, int workingDaysThisMonth, int expectedTickets)
        {
            // Arrange
            var inOfficeTimesheets = timesheetProvider.InOffice(timesheetsInOffice);

            var employee = new EmployeeBuilder()
                           .WithTimesheets(inOfficeTimesheets)
                           .Build();

            // Act
            var result = employee.CalculateVouchers(workingDaysThisMonth, TestResources.OutOfOfficeOperations);

            // Assert
            Assert.Equal(expectedTickets, result.Count);
        }
Beispiel #2
0
        public void Test2(int timesheetsInOffice, int timesheetsOutOfOffice, int daysInDelegation, int workingDaysThisMonth, int expectedTickets)
        {
            // Arrange
            var inOfficeTimesheets    = timesheetProvider.InOffice(timesheetsInOffice);
            var outOfOfficeTimesheets = timesheetProvider.OutOfOffice(timesheetsOutOfOffice);
            var timesheets            = inOfficeTimesheets.Concat(outOfOfficeTimesheets);
            var delegation            = new[]
            {
                new BusinessTrip(daysInDelegation)
            };

            var employee = new EmployeeBuilder()
                           .WithTimesheets(timesheets)
                           .WithBusinessTrips(delegation)
                           .Build();

            // Act
            var result = employee.CalculateVouchers(workingDaysThisMonth, TestResources.OutOfOfficeOperations);

            // Assert
            Assert.Equal(expectedTickets, result.Count);
        }