Exemple #1
0
        public void SchedulingService_Save_InvalidEmptyOrNullName_ShouldBeFail()
        {
            Scheduling scheduling = ObjectMotherScheduling.GetSchedulingInvalidStartTime();

            scheduling.Employee = _mockEmployee.Object;
            scheduling.Room     = _mockRoom.Object;
            Action executeAction = () => _service.Add(scheduling);

            executeAction.Should().Throw <SchedulingStartTimeOverFlowException>();
            _mockRepository.VerifyNoOtherCalls();
        }
Exemple #2
0
        public void Scheduling_InvalidStartTimeOverFlow_ShouldBeFail()
        {
            Scheduling scheduling = ObjectMotherScheduling.GetSchedulingInvalidStartTime();

            scheduling.Id                  = 0;
            scheduling.Employee            = _mockEmployee.Object;
            scheduling.Room                = _mockRoom.Object;
            _mockRoom.Object.Disponibility = true;
            Action comparison = scheduling.Validate;

            comparison.Should().Throw <SchedulingStartTimeOverFlowException>();
        }