Example #1
0
        public CitizenCardNumber(long citizenCardNumber)
        {
            if (!NumberValidator.isValidCitizenCardNumber(citizenCardNumber))
            {
                throw new BusinessRuleValidationException(citizenCardNumber + " invalid: Driver Citizen Card Number invalid");
            }

            if (NumberValidator.isNegative(citizenCardNumber))
            {
                throw new BusinessRuleValidationException(citizenCardNumber + " invalid: Driver Citizen Card Number can't be negative");
            }

            this.citizenCardNumber = citizenCardNumber;
        }