public async Task ThrowDuplicateException_WhenSpecialityCodeExists()
        {
            var request = new CreateSpecialityCommand
            {
                Code = 101,
                Name = "Test Speciality 3"
            };

            var handler = new CreateSpecialityCommandHandler(Context);

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

            Assert.AreEqual(exception.Message, ExceptionMessagesBuilderHelper.GetDuplicateExceptionMessage(nameof(Speciality), "Code", request.Code));
        }
        public async Task CreateSpeciality()
        {
            var request = new CreateSpecialityCommand
            {
                Code = 103,
                Name = "Test Speciality 3"
            };

            var handler = new CreateSpecialityCommandHandler(Context);

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

            Assert.IsTrue(Context.Specialities.Where(x => x.Id == result).Count() == 1);
        }