Beispiel #1
0
        public void GivenAValidValueWhenComputedTheCheckDigitThenAValidCheckDigitMustBeCreated(
            string computedValue, string value, string checkDigit)
        {
            var provider = new Mod11Radix2();

            Assert.Equal(checkDigit, provider.ComputeCheckDigit(value));
        }
Beispiel #2
0
        public void GivenAnBadFormatComputedValueWhenComputedCheckDigitThenExceptionMustBeThrown(string computedValue)
        {
            var provider = new Mod11Radix2();

            Assert.ThrowsAny <ArgumentException>(() =>
            {
                provider.ComputeCheckDigit(computedValue);
            });
        }