Esempio n. 1
0
        public async Task TestDeleteTask()
        {
            var AppointmentTypeService = new AppointmentTypeServices(_AppointmentTypeRepository.Object);
            var result = await AppointmentTypeService.Delete(5);

            Assert.True(result);
        }
Esempio n. 2
0
        public void TestGetById()
        {
            var AppointmentTypeService = new AppointmentTypeServices(_AppointmentTypeRepository.Object);
            var result = AppointmentTypeService.GetById(1);

            Assert.NotNull(result);
        }
Esempio n. 3
0
        public void TestGetAll()
        {
            var AppointmentTypeService = new AppointmentTypeServices(_AppointmentTypeRepository.Object);
            var result = AppointmentTypeService.GetAll();

            Assert.True(result.Count() == 10);
        }
Esempio n. 4
0
        public async Task TestUpdateTask()
        {
            var AppointmentTypeService = new AppointmentTypeServices(_AppointmentTypeRepository.Object);

            var newAppointmentType = Builder <AppointmentType> .CreateNew()
                                     .With(q => q.id = 1)
                                     .Build();

            var result = await AppointmentTypeService.Update(newAppointmentType);

            Assert.AreEqual(newAppointmentType, result);
        }
Esempio n. 5
0
        public async Task TestAddTask()
        {
            var AppointmentTypeService = new AppointmentTypeServices(_AppointmentTypeRepository.Object);

            var newAppointmentType = Builder <AppointmentType> .CreateNew()
                                     .With(q => q.id = 0)
                                     .Build();

            var result = await AppointmentTypeService.Add(newAppointmentType);

            Assert.True(result.id == 525);
        }