public async Task ThrowNotFoundException_WhenSpecialityIsNotExists()
        {
            var request = new DeleteSpecialityCommand
            {
                Id = 100
            };

            var handler = new DeleteSpecialityCommandHandler(Context);

            var exception = Assert.ThrowsAsync <NotFoundException>(async() => await handler.Handle(request, CancellationToken.None));

            Assert.AreEqual(exception.Message, ExceptionMessagesBuilderHelper.GetNotFoundExceptionMessage(nameof(Speciality), request.Id));
        }
        public async Task DeleteSpeciality()
        {
            var request = new DeleteSpecialityCommand
            {
                Id = 1
            };

            var handler = new DeleteSpecialityCommandHandler(Context);

            var result = await handler.Handle(request, CancellationToken.None);

            Assert.IsFalse(Context.Specialities.Where(x => x.Id == request.Id).Count() == 1);
        }
        public async Task ThrowDeleteFailureException_WhenGroupWithSpecialityExists()
        {
            var request = new DeleteSpecialityCommand
            {
                Id = 2
            };

            var handler = new DeleteSpecialityCommandHandler(Context);

            var exception = Assert.ThrowsAsync <DeleteFailureException>(async() => await handler.Handle(request, CancellationToken.None));

            Assert.AreEqual(exception.Message, ExceptionMessagesBuilderHelper.GetDeleteFailureExceptionMessage(nameof(Speciality), request.Id, "There are group(s) on this speciality"));
        }