Exemple #1
0
        public void CreateRepSchedule_OnProvidingValidObject_ReturnsRepScheduleList(DateTime ScheduleStartDate)
        {
            //Arrange
            IRepScheduleService repService = new RepScheduleService(doctorRepository.Object, representativeRepository.Object, medicineProvider.Object);
            //Act
            var response = repService.CreateRepSchedule(ScheduleStartDate).Result;

            //Assert
            Assert.IsNotNull(response);
        }
Exemple #2
0
        public void CreateRepSchedule_onInvalidInput_ThrowsArgumentException(DateTime ScheduleStartDate)
        {
            //Arrange
            IRepScheduleService repService = new RepScheduleService(doctorRepository.Object, representativeRepository.Object, medicineProvider.Object);
            //Act
            var result = Assert.ThrowsAsync <ArgumentException>(() => repService.CreateRepSchedule(ScheduleStartDate));

            //Assert
            Assert.That(result.Message, Is.EqualTo("InValid date"));
        }