public void GetNumberOfUnsuccessfulScheduling()
        {
            EventStorePatientEndSchedulingService  eventEndService = SetupEventEndService();
            SuccessfulAndUnsuccessfulSchedulingDTO endStatistic    = eventEndService.SuccessfulAndUnsuccessfulScheduling();

            Assert.Equal(2, endStatistic.NumberOfUnsuccessfulScheduling);
        }
        public void GetSuccessfulAgeStatistic()
        {
            EventStorePatientEndSchedulingService eventEndService = SetupEventEndService();
            MinAvgMaxStatisticDTO endStatistic = eventEndService.SuccessfulSchedulingAgeStatistic();

            Assert.Equal(25, endStatistic.Average);
        }
        public void SuccessGetAllEndEvent()
        {
            EventStorePatientEndSchedulingService   eventEndService = SetupEventEndService();
            IEnumerable <PatientEndSchedulingEvent> endEvents       = eventEndService.GetAll();

            Assert.NotEmpty(endEvents);
        }
        public void GetSuccessfulGenderStatistic()
        {
            EventStorePatientEndSchedulingService eventEndService = SetupEventEndService();
            GenderStatisticDTO endStatistic = eventEndService.SuccessfulSchedulingGenderStatistic();

            Assert.Equal(2, endStatistic.TotalNumber);
        }
        public void SuccessAddNewEndEvent()
        {
            EventStorePatientEndSchedulingService eventEndService = SetupEventEndService();
            PatientEndSchedulingEvent             endEvent        = eventEndService.Add(new PatientEndSchedulingEventDTO()
            {
                TriggerTime = DateTime.Now, StartSchedulingEventId = 1, StartSchedulingEventTime = DateTime.Now.AddMinutes(3), UserAge = 35, UserGender = EventSourcingService.Model.Enum.Gender.Female, ReasonForEndOfAppointment = EventSourcingService.Model.Enum.ReasonForEndOfAppointment.Success
            });

            Assert.True(eventEndService.Contain(endEvent.Id));
        }